Skip to content

fat: additions to support fat_fallocate

Namjae Jeon linux-fsdevel 4 versions – In review

Get series with b4
b4 am '[email protected]'

Versions newest first · linked by author and title

  1. v8 Latest4 patches 4 repliesIn review
  2. v74 patches 4 repliesSuperseded
  3. v64 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v55 patches4 repliesSuperseded

Changes in v8 from the cover letter

- Make fat_bmap as common and control via. argument to check invocation path. If it is from fibmap interface change the last_block calculation and get proper block mapping otherwise make it work like normal path and throw error if it exceeds EOF
- Also retain the fat12/fat16 condition to avoid checking cluster chain for root inode
- clean up the evict path, make separate static routine for freeing up blocks past EOF

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fat: add fat_fallocate operationfs/fat/fat.h fs/fat/file.c fs/fat/inode.c+94 -24 replies
2/4fat: skip cluster allocation on fallocated regionfs/fat/inode.c+8 -20 replies
3/4fat: permit to return phy block number by fibmap in fallocated regionfs/fat/cache.c fs/fat/dir.c fs/fat/fat.h +1 more+87 -300 replies
4/4Documentation/filesystems/vfat.txt: update the limitation for fat fallocateDocumentation/filesystems/vfat.txt+10 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/4] fat: additions to support fat_fallocate

This patch set provides support for doing fallocate operation on FAT filesystem.

v8:
- Make fat_bmap as common and control via. argument to check invocation path. If it is from fibmap interface change the last_block calculation and get proper block mapping otherwise make it work like normal path and throw error if it exceeds EOF
- Also retain the fat12/fat16 condition to avoid checking cluster chain for root inode
- clean up the evict path, make separate static routine for freeing up blocks past EOF

v7:
- Make last_block calculation dependent upon the sector size, as the default i_blocks is always fixed with 512 byte alignment but the blocksize will vary in 4KB sector size disk.
Also, tested using fsstress and fsx(both buffered and directIO) to cover if there are any issues.

v6:
- Remove usage of i_disksize
- Align all fallocate code sequence to use i_blocks as
this is more or less can be used to denote the on-disksize. Also, i_blocks is common in update path of cluster allocation via. fat_chain_add() both from normal write path and fallocate() operation

v5:
- change all routines to make ->i_disksize aligned by cluster size.
- merge fat_bmap2() and fat_get_block_bmap().

v4:
- ->i_disksize is aligned by block size in fill_inode.
- use i_disksize when computing the number of cluster for fallocate.
- make fat_get_block_bmap to avoid race issue.
- use __fat_write_inode() with inode_needs_sync() in evict.

v3:
- fix i_disksize and mmu_private comments(uninit/initialized)
- remove unneeded condition in fat_bmap.
- use mmu_private instead of fclus in fat_fallocate.
- make function mark buffer new for block in fallocated region.
- use flags for bmap.
- use mmu_private instead of i_size in direct_IO.
- use flags and remove i_mutex in bmap.
- update vfat documentation.

v2:
- remove a stary unlock(from Dan Carpenter)
- check ->mmu_private and ->i_disksize to truncate uninitialized data.

Namjae Jeon (4):
fat: add fat_fallocate operation
fat: skip cluster allocation on fallocated region
fat: permit to return phy block number by fibmap in fallocated region Documentation/filesystems/vfat.txt: update the limitation for fat
fallocate

 Documentation/filesystems/vfat.txt |   10 +++++
 fs/fat/cache.c                     |   80 ++++++++++++++++++++++++------------
 fs/fat/dir.c                       |    2 +-
 fs/fat/fat.h                       |    6 ++-
 fs/fat/file.c                      |   61 +++++++++++++++++++++++++++
 fs/fat/inode.c                     |   75 +++++++++++++++++++++++++++++----
 6 files changed, 199 insertions(+), 35 deletions(-)
Signature · 1 line
1.7.9.5