e2fsprogs/lib/ext2fs
Theodore Ts'o bb1158b92e 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>
2010-05-17 23:04:40 -04:00
..
tdb Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
Makefile.in Always build namei.o so that building with "configure --disable-debugfs" works 2010-05-17 19:32:19 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
alloc.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
alloc_sb.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
alloc_stats.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
alloc_tables.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
badblocks.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bb_compat.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bb_inode.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bitmaps.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bitops.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bitops.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
block.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bmap.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
bmove.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
brel.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
brel_ma.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
check_desc.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
closefs.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
crc16.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
crc16.h Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
csum.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dblist.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dblist_dir.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dir_iterate.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dirblock.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dirhash.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dosio.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dosio.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dupfs.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
e2image.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
expanddir.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ext2_err.et.in libext2fs: Add an explicit error code for missing mtab file 2009-05-29 00:11:52 -04:00
ext2_ext_attr.h Fix gcc -Wall complaints in libext2fs 2006-11-14 23:14:12 -05:00
ext2_fs.h e2fsck: don't complain about i_size for known blocks past EOF 2010-02-24 11:24:37 -05:00
ext2_io.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ext2_types.h.in Fix ext2fs_swap{16,32,64} for external applications on big-endian machines 2008-06-07 08:55:21 -04:00
ext2fs.h mke2fs: account for physical as well as logical sector size 2010-05-17 23:04:40 -04:00
ext2fs.pc.in Fix pkg-config files: use Requires.private and fix the include directory 2008-09-02 21:20:44 -04:00
ext2fsP.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ext3_extents.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ext_attr.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
extent.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
extent_dbg.ct libext2fs: add new function ext2fs_extent_set_bmap() 2008-06-02 18:52:05 -04:00
fiemap.h Add missing file: lib/ext2fs/fiemap.h 2009-05-04 07:39:56 -04:00
fileio.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
finddev.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
flushb.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
freefs.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
gen_bitmap.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
get_pathname.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
getsectsize.c mke2fs: account for physical as well as logical sector size 2010-05-17 23:04:40 -04:00
getsize.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
i_block.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
icount.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
imager.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ind_block.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
initialize.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
inline.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
inode.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
inode_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
io_manager.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
irel.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
irel_ma.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
ismounted.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
jfs_compat.h e2fsck: Add support to check journal checksums 2008-06-06 23:38:38 -04:00
jfs_dat.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
jfs_user.h Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the 2001-12-23 19:33:51 -05:00
kernel-jbd.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
kernel-list.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
link.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
llseek.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
lookup.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
mkdir.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
mkjournal.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
namei.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
native.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
newdir.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
nt_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
openfs.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
read_bb.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
read_bb_file.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
res_gdt.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
rw_bitmaps.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
sparse.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
swapfs.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tdb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tdb.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tdbtool.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
test_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_badblocks.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_bitops.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_byteswap.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_getsectsize.c mke2fs: account for physical as well as logical sector size 2010-05-17 23:04:40 -04:00
tst_getsize.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_iscan.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_super_size.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
tst_types.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
undo_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
unix_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
unlink.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
valid_blk.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
version.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
write_bb_file.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00