RFC Block reservation for ext3
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vfs: Unmap underlying metadata of new data buffers only when buffer is mappedfs/ | +7 | 0 replies | |
| 2/3 | vfs: Implement generic per-cpu counters for delayed allocationfs/ fs/ fs/ +2 more | +188 | 1 reply | |
| 3/3 | ext3: Implement delayed allocation on page_mkwrite timefs/ fs/ fs/ +6 more | +458 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/3] Block reservation for ext3
Hi,
currently, when mmapped write is done to a file backed by ext3, the
filesystem does nothing to make sure blocks will be available when we need to write them out. This has two nasty consequences:
1) When flusher thread does writeback of the mmapped data, allocation happens in the context of flusher thread (i.e., as root). Thus user can effectively arbitrarily exceed quota limits or use space reserved only for sysadmin.
2) When a filesystem runs out of space, we just silently drop data on the floor (the same happens when writeout is performed in the context of the user and he hits his quota limit).
I think these problems are serious enough (especially (1) about which I was
notified lately) so that we try to fix them in ext3. The trouble is that the fix in non-trivial. We have to basically implement delayed allocation for ext3
- block reservation happens on page_mkwrite() time and we convert the reservation into a real allocation during writeout. Note: Of course, we could use a much simpler solution and just do block allocation directly at page_mkwrite() time but that really cripples performance for loads that do random writes via mmap - I've tried that some time ago.
The patches in this series (against 2.6.26-rc7) implement this. They
survived some testing with fsx-linux, I'll do more and also some performance testing.
So I'd like to hear what other people think about this. Reviews or
testing are welcome ;)
Honza