Package: dosfstools
Version: 3.0.16-2
Severity: wishlist
Tags: upstream

Hi Daniel.

I hope my understanding of FAT isn't all too wrong, but AFAIU, the logical
sector size (i.e. -S switch) is analogous to the block size in e.g. ext*, right?

If so,.. wouldn't it make sense (for performance reasons) to try to set these
to the block size of the underlying device, which in case of upcoming HDDs
would be 4 KiB...


Ideally, of course, mkdosfs would use device topology information (well at least
on modern Linux kerne), to determine both, the ideal sector size, as well
as their alignment. That would expose the necessary information even as it's
modified through the different block layers, e.g.:
# lsblk -t
NAME                      ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED 
RQ-SIZE
sda                               0    512      0     512     512    0 cfq      
 128
└─sda1                            0    512      0     512     512    0 cfq      
 128
  ├─vg_system-root (dm-0)         0    512      0     512     512    0          
 128
  │ └─root (dm-2)                 0    512      0     512     512    0          
 128
  └─vg_system-swap (dm-1)         0    512      0     512     512    0          
 128
sdb                               0    512      0     512     512    1 cfq      
 128
└─sdb1                            0    512      0     512     512    1 cfq      
 128
loop0                             0    512      0     512     512    1          
 128

(which here uses filesystem on top of dmcrypt, on top of LVM on top of 
partitions.


btw: I tried to manually set the sector size to 4096 but that seems to cause
troubles:
# mkfs.vfat -v -S 4096 -F 32 -n "ESP" /dev/loop0 
mkfs.vfat 3.0.16 (01 Mar 2013)
Loop device does not match a floppy size, using default hd params
WARNING: Not enough clusters for a 32 bit FAT!
/dev/loop0 has 64 heads and 32 sectors per track,
logical sector size is 4096,
using 0xf8 media descriptor, with 131072 sectors;
file system has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 16 sectors, and provides 16376 clusters.
There are 32 reserved sectors.
Volume ID is abde448e, volume label ESP        .

What's the problem here?


Cheers,
Chris.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to