From 11393006c60e4a747f41c6f28c481e54238a10a3 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 12 Jul 2003 01:58:12 -0400 Subject: [PATCH] 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) --- misc/ChangeLog | 7 +++++++ misc/mke2fs.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index d56c20d..60f30db 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,10 @@ +2003-07-12 Theodore Ts'o + + * 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 * mke2fs.c (PRS, main): If CONFIG_TESTIO_DEBUG, then use the diff --git a/misc/mke2fs.c b/misc/mke2fs.c index eddf959..110ca35 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -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) -- 1.8.3.1