diff options
author | Eric Van Hensbergen <ericvh@kernel.org> | 2023-03-27 04:53:10 +0300 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@kernel.org> | 2023-04-10 00:41:21 +0300 |
commit | 4eb3117888a923f6b9b1ad2dd093641c49a63ae5 (patch) | |
tree | 789a090dabce6ae9a4c6b557cfcfbe6417170215 /fs/9p/fid.h | |
parent | 1543b4c5071c54d76aad7a7a26a6e43082269b0c (diff) | |
download | linux-4eb3117888a923f6b9b1ad2dd093641c49a63ae5.tar.xz |
fs/9p: Rework cache modes and add new options to Documentation
Switch cache modes to a bit-mask and use legacy
cache names as shortcuts. Update documentation to
include information on both shortcuts and bitmasks.
This patch also fixes missing guards related to fscache.
Update the documentation for new mount flags
and cache modes.
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Diffstat (limited to 'fs/9p/fid.h')
-rw-r--r-- | fs/9p/fid.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 11576e1364bf..0c51889a60b3 100644 --- a/fs/9p/fid.h +++ b/fs/9p/fid.h @@ -56,11 +56,9 @@ static inline void v9fs_fid_add_modes(struct p9_fid *fid, int s_flags, ((fid->qid.version == 0) && !(s_flags & V9FS_IGNORE_QV)) || (s_flags & V9FS_DIRECT_IO) || (f_flags & O_DIRECT)) { fid->mode |= P9L_DIRECT; /* no read or write cache */ - } else if ((s_cache < CACHE_WRITEBACK) || + } else if ((!(s_cache & CACHE_WRITEBACK)) || (f_flags & O_DSYNC) | (s_flags & V9FS_SYNC)) { fid->mode |= P9L_NOWRITECACHE; - } else if (s_cache == CACHE_LOOSE) { - fid->mode |= P9L_LOOSE; /* noncoherent cache */ } } #endif |