Whamcloud - gitweb
mke2fs.c (set_fs_defaults): If sector_size is 0, don't use it to
authorTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jul 2003 05:58:12 +0000 (01:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jul 2003 05:58:12 +0000 (01:58 -0400)
set the blocksize to zero.  This causes MD devices to fail
since they don't support the BLKSSZGET ioctl.  (Addresses
Debian bug #196734)

misc/ChangeLog
misc/mke2fs.c

index d56c20d..60f30db 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-12  Theodore Ts'o  <tytso@mit.edu>
+
+       * mke2fs.c (set_fs_defaults): If sector_size is 0, don't use it to
+               set the blocksize to zero.  This causes MD devices to fail
+               since they don't support the BLKSSZGET ioctl.  (Addresses
+               Debian bug #196734)
+
 2003-07-06  Theodore Ts'o  <tytso@mit.edu>
 
        * mke2fs.c (PRS, main): If CONFIG_TESTIO_DEBUG, then use the
index eddf959..110ca35 100644 (file)
@@ -171,7 +171,7 @@ static void set_fs_defaults(const char *fs_type,
                                blocksize : p->inode_ratio;
                use_bsize = p->blocksize;
        }
-       if (use_bsize < sector_size)
+       if (sector_size && use_bsize < sector_size)
                use_bsize = sector_size;
        if (blocksize <= 0) {
                if (use_bsize == DEF_MAX_BLOCKSIZE)