Skip to content

Make page_mkwrite() more useful for blocksize < pagesize

Jan Kara linux-ext4 linux-fsdevel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vfs: Add better VFS support for page_mkwrite when blocksize < pagesizefs/buffer.c include/linux/buffer_head.h include/linux/fs.h +2 more+153 -40 replies
2/4ext2: Allocate space for mmaped file on page faultfs/ext2/file.c fs/ext2/inode.c+26 -10 replies
3/4ext4: Make sure blocks are properly allocated under mmaped page even when blocksize < pagesizefs/ext4/inode.c+10 -00 replies
4/4ext3: Allocate space for mmaped file on page faultfs/ext3/file.c fs/ext3/inode.c include/linux/ext3_fs.h+103 -1220 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] Make page_mkwrite() more useful for blocksize < pagesize

Hi,

this is a next version of my patches which implement VFS helpers so that
page_mkwrite() is reliably called at the first write access to a page after the amount of blocks allocated under the page could change. This solves the problem with filesystems dropping data on the floor when they hit ENOSPC (or EDQUOT) during writepage().
The series also contains patches for ext[2-4] showing how the VFS framework
can be used. This is probably not the final version of the patches since I did some performance measurements with ext3 and allocating blocks on page-fault time instead of at writepage() time has a significant cost - BerkelyDB based workloads are slower by ~10% because of much higher file fragmentation (essentially allocation at writepage time had a kind of delayed allocation effect for us and it helped a lot in these random write scenarios). I'm thinking how to solve this so that any filesystem wanting reliable mmap and reasonable performance behaviour doesn't have to implement something like delayed allocation or other workaround again...

Honza