tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] GOP_ALLOC and fallocate for puffs (round 2)
Hi
Here is the latest iteration of my patch to ensure we avoid sending data
to the page cache we cannot flush later.
http://ftp.espci.fr/shadow/manu/puffs-alloc.patch
- When writing, we make sure backend storage is allocated in two cases:
1) the file is sparse, hence we never know if backend storage is here.
2) the file grows: we know we need to allocated for the new area.
- sparse file detection is done at when updating metadata cache: if
size is bigger than allocated blocks, it is sparse.
- I add fallocate FUSE operation (userland support is in another patch)
for efficient backend storage allocation.
- If fallocate is unavailable, I fallback to explicit zero-filling.
- puffs_vnop_write() is split into two functions, puffs_vnop_write_cache()
that writes in cache, puffs_vnop_write_fs that writes to the FS
The change lets NetBSD pass GlusterFS quota test. Without it, process
writing over quota hang in DE state (exitting, disk I/O ongoing: it cannot
flush cached data overquota and therefore cannot exit).
Opinions?
One possible improvement: if PUFFS fallocate returne EOPNOTSUP / ENOSYS,
we remove it from the operation array? This is dirty, but since we have
a fallocate systemcalls that has no implementation for FFS, we are very
likely to encounter that case.
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index