]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: remove BMV_IF_NO_DMAPI_READ flag
authorAnthony Iliopoulos <ailiop@suse.com>
Tue, 20 Apr 2021 17:58:15 +0000 (13:58 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 20 Apr 2021 17:58:15 +0000 (13:58 -0400)
Use of the flag has had no effect since kernel commit 288699fecaff
("xfs: drop dmapi hooks"), which removed all dmapi related code, so
remove it from bmap.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/bmap.c
man/man8/xfs_bmap.8
po/de.po
po/pl.po
scrub/filemap.c

index f838840eb5336270b1c77f27250baabb0ca0c121..27383ca603755193670bf52e9fe1c9a838f66336 100644 (file)
--- a/io/bmap.c
+++ b/io/bmap.c
@@ -33,7 +33,6 @@ bmap_help(void)
 " -a -- prints the attribute fork map instead of the data fork.\n"
 " -c -- prints the copy-on-write fork map instead of the data fork.\n"
 "       This works only if the kernel was compiled in debug mode.\n"
-" -d -- suppresses a DMAPI read event, offline portions shown as holes.\n"
 " -e -- print delayed allocation extents.\n"
 " -l -- also displays the length of each extent in 512-byte blocks.\n"
 " -n -- query n extents.\n"
@@ -67,7 +66,7 @@ bmap_f(
        int                     c;
        int                     egcnt;
 
-       while ((c = getopt(argc, argv, "acdeln:pv")) != EOF) {
+       while ((c = getopt(argc, argv, "aceln:pv")) != EOF) {
                switch (c) {
                case 'a':       /* Attribute fork. */
                        bmv_iflags |= BMV_IF_ATTRFORK;
@@ -86,10 +85,6 @@ bmap_f(
                case 'n':       /* number of extents specified */
                        nflag = atoi(optarg);
                        break;
-               case 'd':
-               /* do not recall possibly offline DMAPI files */
-                       bmv_iflags |= BMV_IF_NO_DMAPI_READ;
-                       break;
                case 'p':
                /* report unwritten preallocated blocks */
                        pflag = 1;
@@ -103,7 +98,7 @@ bmap_f(
                }
        }
        if (aflag || cflag)
-               bmv_iflags &= ~(BMV_IF_PREALLOC|BMV_IF_NO_DMAPI_READ);
+               bmv_iflags &= ~BMV_IF_PREALLOC;
 
        if (vflag) {
                c = -xfrog_geometry(file->fd, &fsgeo);
@@ -154,19 +149,10 @@ bmap_f(
  *     EINVAL, check the length with fstat() and return "no extents"
  *     if the length == 0.
  *
- *     Why not do the xfsctl(FS_IOC_FSGETXATTR[A]) first?  Two reasons:
- *     (1)     The extent count may be wrong for a file with delayed
- *             allocation blocks.  The XFS_IOC_GETBMAPX forces the real
- *             allocation and fixes up the extent count.
- *     (2)     For XFS_IOC_GETBMAP[X] on a DMAPI file that has been moved
- *             offline by a DMAPI application (e.g., DMF) the
- *             FS_IOC_FSGETXATTR only reflects the extents actually online.
- *             Doing XFS_IOC_GETBMAPX call first forces that data blocks online
- *             and then everything proceeds normally (see PV #545725).
- *
- *             If you don't want this behavior on a DMAPI offline file,
- *             try the "-d" option which sets the BMV_IF_NO_DMAPI_READ
- *             iflag for XFS_IOC_GETBMAPX.
+ *     Why not do the xfsctl(FS_IOC_FSGETXATTR[A]) first?
+ *     The extent count may be wrong for a file with delayed
+ *     allocation blocks.  The XFS_IOC_GETBMAPX forces the real
+ *     allocation and fixes up the extent count.
  */
 
        do {    /* loop a miximum of two times */
@@ -441,7 +427,7 @@ bmap_init(void)
        bmap_cmd.argmin = 0;
        bmap_cmd.argmax = -1;
        bmap_cmd.flags = CMD_NOMAP_OK;
-       bmap_cmd.args = _("[-adlpv] [-n nx]");
+       bmap_cmd.args = _("[-acelpv] [-n nx]");
        bmap_cmd.oneline = _("print block mapping for an XFS file");
        bmap_cmd.help = bmap_help;
 
index dd925b12dbd4d2b31abf1d224ad7a60082b45401..9ec7f52b84f2b937fd1e43745313e64887ed1350 100644 (file)
@@ -36,15 +36,6 @@ no matter what the filesystem's block size is.
 If this option is specified, information about the file's
 attribute fork is printed instead of the default data fork.
 .TP
-.B \-d
-If portions of the file have been migrated offline by
-a DMAPI application, a DMAPI read event will be generated to
-bring those portions back online before the disk block map is
-printed.  However if the
-.B \-d
-option is used, no DMAPI read event will be generated for a
-DMAPI file and offline portions will be reported as holes.
-.TP
 .B \-e
 If this option is used,
 .B xfs_bmap
index aa9af769ab896ef55003dde532aafa40e2efcb52..944b0e91deb2c693148ec150dbc6cc0642220343 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -4670,7 +4670,6 @@ msgid ""
 " Holes are marked by replacing the startblock..endblock with 'hole'.\n"
 " All the file offsets and disk blocks are in units of 512-byte blocks.\n"
 " -a -- prints the attribute fork map instead of the data fork.\n"
-" -d -- suppresses a DMAPI read event, offline portions shown as holes.\n"
 " -l -- also displays the length of each extent in 512-byte blocks.\n"
 " Note: the bmap for non-regular files can be obtained provided the file\n"
 " was opened appropriately (in particular, must be opened read-only).\n"
@@ -4694,8 +4693,6 @@ msgstr ""
 " Alle Datei-Offsets und Plattenblöcke sind Einheiten aus 512-Byte-Blöcken.\n"
 " -a -- gibt die Attributs-Verzweigungs-Karte statt der\n"
 "       Daten-Verzweigung aus.\n"
-" -d -- unterdrückt ein DMAPI-Lese-Ereignis, Offline-Teile werden als Löcher\n"
-"       betrachtet.\n"
 " -l -- zeigt außerdem die Länge von jedem Bereich in 512-Byte Blöcken.\n"
 " Anmerkung: Das »bmap« für irreguläre Dateien kann bereitgestellt werden,\n"
 " statt der Datei die passend geöffnet wurde (im Einzelnen darf sie\n"
index cf9d2e8edac953370acda24985d5d3ff746aeb2a..e5a1aad8307e94a82a309a8da99f4573041e9881 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -6252,7 +6252,6 @@ msgid ""
 " -a -- prints the attribute fork map instead of the data fork.\n"
 " -c -- prints the copy-on-write fork map instead of the data fork.\n"
 "       This works only if the kernel was compiled in debug mode.\n"
-" -d -- suppresses a DMAPI read event, offline portions shown as holes.\n"
 " -e -- print delayed allocation extents.\n"
 " -l -- also displays the length of each extent in 512-byte blocks.\n"
 " -n -- query n extents.\n"
@@ -6278,8 +6277,6 @@ msgstr ""
 " Wszystkie offsety w plikach i bloki dysku są w jednostkach 512-bajtowych.\n"
 " -a - wypisanie mapy gałęzi atrybutów zamiast gałęzi danych.\n"
 " -c - wypisanie mapy gałęzi CoW zamiast gałęzi danych.\n"
-" -d - pominięcie zdarzenia odczytu DMAPI, pokazanie części offline jako "
-"dziur.\n"
 " -e - wypisanie ekstentów opóźnionego przydzielania.\n"
 " -l - wyświetlenie także długości każdego ekstentu w 512-bajtowych blokach.\n"
 " -n - odpytanie n ekstentów.\n"
index 0b914ef6017acf567be687e7d9b392bd886fc0fe..d4905ace659edb6dcae2b2b02ae9dd6a28c105df 100644 (file)
@@ -55,8 +55,7 @@ scrub_iterate_filemaps(
                map->bmv_length = ULLONG_MAX;
        else
                map->bmv_length = BTOBB(key->bm_length);
-       map->bmv_iflags = BMV_IF_NO_DMAPI_READ | BMV_IF_PREALLOC |
-                         BMV_IF_NO_HOLES;
+       map->bmv_iflags = BMV_IF_PREALLOC | BMV_IF_NO_HOLES;
        switch (whichfork) {
        case XFS_ATTR_FORK:
                getxattr_type = XFS_IOC_FSGETXATTRA;