linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ext4: Handle different max offsets for bitmap & extent-based files
@ 2007-12-04 15:55 Eric Sandeen
  2007-12-04 15:58 ` [PATCH 1/3] ext4: different maxbytes functions for bitmap & extent files Eric Sandeen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric Sandeen @ 2007-12-04 15:55 UTC (permalink / raw)
  To: ext4 development

Basic approach: have both ext4_max_bitmap_size() and ext4_max_size()
functions to compute max offsets for both types of formats.

Use vfs sb->s_maxbytes for the "native" maxbytes, i.e. extent-format files.

Put the smaller bitmap limit in a new sbi->s_bitmap_maxbytes in the ext4
superblock info structure.

Catch bitmap files in ext4_file_write() and ext4_setattr() to limit
extending writes, llseeks, and truncates to too-large offsets which the
VFS let through due to the extent-format maxbytes.  On write, allow
writes up to the max, but then stop, by using iov_shorten() to limit the
size of the write to the maximum.

3 patches follow:

ext4_two_maxbytes_functions.patch - differentiate the maxbytes f'ns
ext4_bitmap_maxbytes_vfs.patch - export iov_shorten from kernel
ext4_bitmap_maxbytes.patch - store, and limit to, bitmap_maxbytes

Comments?

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-12-05 23:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04 15:55 [PATCH 0/3] ext4: Handle different max offsets for bitmap & extent-based files Eric Sandeen
2007-12-04 15:58 ` [PATCH 1/3] ext4: different maxbytes functions for bitmap & extent files Eric Sandeen
2007-12-05 23:18   ` Andreas Dilger
2007-12-05 23:22     ` Eric Sandeen
2007-12-04 15:59 ` [PATCH 2/3] ext4: export iov_shorten from kernel for ext4's use Eric Sandeen
2007-12-04 16:00 ` [PATCH 3/3] ext4: store maxbytes for bitmapped files and return EFBIG as appropriate Eric Sandeen
2007-12-04 19:31   ` [PATCH 3/3] ext4: (V2) " Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).