]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Merge fix for xfs_bmap verbose mode stripe alignment calculations.
authorJohn Keller <jpk@sgi.com>
Tue, 23 Mar 2004 22:43:38 +0000 (22:43 +0000)
committerJohn Keller <jpk@sgi.com>
Tue, 23 Mar 2004 22:43:38 +0000 (22:43 +0000)
io/bmap.c

index 20e48ca6c23eea2d4bc1d0f0b6733cc57c21eeef..0eef45c877b0cb4aa118b6a12c378dac70f673f4 100644 (file)
--- a/io/bmap.c
+++ b/io/bmap.c
@@ -299,8 +299,8 @@ bmap_f(
                tot_w = MINTOT_WIDTH;
                bbperag = (off64_t)fsgeo.agblocks *
                          (off64_t)fsgeo.blocksize / BBSIZE;
-               sunit = fsgeo.sunit;
-               swidth = fsgeo.swidth;
+               sunit = (fsgeo.sunit * fsgeo.blocksize) / BBSIZE;
+               swidth = (fsgeo.swidth * fsgeo.blocksize) / BBSIZE;
                flg = sunit;
 
                /*
@@ -349,6 +349,10 @@ bmap_f(
                        if (map[i + 1].bmv_oflags & BMV_OF_PREALLOC) {
                                flg |= FLG_PRE;
                        }
+                       /*
+                        * If striping enabled, determine if extent starts/ends
+                        * on a stripe unit boundary.
+                        */
                        if (sunit) {
                                if (map[i + 1].bmv_block  % sunit != 0) {
                                        flg |= FLG_BSU;