tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How PUFFS should deal with EDQUOT?
On Mon, Sep 22, 2014 at 06:28:38AM +0200, Emmanuel Dreyfus wrote:
> When a PUFFS filesystem enforces quota, a process doing a write over
> quota will end frozen in DE+ state.
>
> The problem is that we have written data in the page cache that is
> supposed to go to disk. The code path is a bit complicated, but
> basically we go in genfs VOP_PUTPAGE, which leads to genfs_do_io() where
> we have a VOP_STRATEGY, which cause PUFFS write. The PUFFS write will
> get EDQUOT, but genfs_do_io() ignores VOP_STRATEGY's return value and
> retries forever.
>
> In other words, when flushing the cache, the kernel ignores errors from
> the filesystem and runs an endless loop attempting to flush data, during
> which the process that did the over quota write is not allowed to
> complete exit().
>
> What is the proper way to deal with that? Is it reasonable to wipe the
> page cache using puffs_inval_pagecache_node() when write gets a failure?
> Any failure? Or just EDQUOT and ENOSPC? Should that happen in libpuffs
> or in the filesystem (libperfuse here)?
The cache shouldn't discard data; that isn't cool. The filesystem
should generate EDQUOT before entering the offending data into the
cache. (Once you enter the data into the cache, the application gets
told it succeeded... so errors afterwards aren't helpful.)
Does this happen with ffs quotas, or with some fuse thing that does
quotas its own incompatible way?
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index