]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - lib/ext2fs/ext2fs.h
mke2fs: account for physical as well as logical sector size
authorTheodore Ts'o <tytso@mit.edu>
Tue, 18 May 2010 02:31:45 +0000 (22:31 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 May 2010 03:04:40 +0000 (23:04 -0400)
commitbb1158b92ed8a12ab9e9317ca6ddd97bc12447d3
tree093b45cce8de2c045fbfacd87834f81c0524541d
parent543547a52a20cb7e69d74921b2f691078fd55d83
mke2fs: account for physical as well as logical sector size

Some devices, notably 4k sector drives, may have a 512 logical
sector size, mapped onto a 4k physical sector size.

When mke2fs is ratcheting down the blocksize for small filesystems,
or when a blocksize is specified on the commandline, we should not
willingly go below the physical sector size of the device.

When a blocksize is specified, we -must- not go below
the logical sector size of the device.

Add a new library function, ext2fs_get_device_phys_sectsize()
to get the physical sector size if possible, and adjust the
logic in mke2fs to enforce the above rules.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian/e2fslibs.symbols
lib/ext2fs/ext2fs.h
lib/ext2fs/getsectsize.c
lib/ext2fs/tst_getsectsize.c
misc/mke2fs.c