tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] PUFFS with cache TTL from filesystem
hi,
> YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost> wrote:
>
>> - i feel that the api is too specific to the use of libperfuse.
>> - it should not require puffs_node.
>
> I started without puffs_node at once but that require changing vnop
> methods prototypes and makes them heavyweight. The chosen solution has
> merits for the sake of readability and backward compatibility.
if you want to avoid prototype changes, another set of puffs_newinfo_setfoo()
would be enough for DIROPs.
GETATTR needs another versions of op callbacks, yes. it doesn't seem
like a big problem to me, tho.
>
>
>> - i think you mixed up at least two separate features.
>> they ought to have separate flags.
>> - DIROP's ability to return file attribute
>> - attribute TTLs
>> - it would be better to allow file server choose if it returns attributes
>> on DIROPs per-request basis rather than per-mount. like nfsv3.
>
> Those two are the same problem.
>
> We could simply ignore attributes when attribute TTL is set to 0. It
> makes sense since on lookup/create/mkdir/mknod/symlink, the attributes
> returned by the fileystem have no immediate use by the kernel. A TTL set
> to 0 means they should not be used for a subsequent getattr, so we can
> cut corners and just not save them.
>
> And if the filesystem wants to set attributes without a TTL, there is
> always the solution to set a far away TTL. Perahps I could just define a
> magic value for that.
it sounds fine to me. thanks for explanation.
>
>> - as new functions returns a pointer, it's better to follow
>> the existing naming convention. ie. "p" of puffs_pn_getvap
>
> Right.
>
>> - please handle ticks wraparounds.
>
> Any example of some code where this is done?
common ways are
- use a less-wraparound-prune clock like time_uptime unless you
really need tick-precision
- (signed type)((unsigned type)now - (unsigned type)expire) > 0
YAMAMOTO Takashi
>
> --
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index