mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
fuse: fuse: add time_gran to INIT_OUT
Allow userspace fs to specify time granularity. This is needed because with writeback_cache mode the kernel is responsible for generating mtime and ctime, but if the underlying filesystem doesn't support nanosecond granularity then the cache will contain a different value from the one stored on the filesystem resulting in a change of times after a cache flush. Make the default granularity 1s. Signed-off-by: Miklos Szeredi <[email protected]>
This commit is contained in:
parent
1e18bda86e
commit
e27c9d3877
2 changed files with 12 additions and 0 deletions
|
|
@ -891,6 +891,11 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
|
|||
fc->async_dio = 1;
|
||||
if (arg->flags & FUSE_WRITEBACK_CACHE)
|
||||
fc->writeback_cache = 1;
|
||||
if (arg->time_gran && arg->time_gran <= 1000000000)
|
||||
fc->sb->s_time_gran = arg->time_gran;
|
||||
else
|
||||
fc->sb->s_time_gran = 1000000000;
|
||||
|
||||
} else {
|
||||
ra_pages = fc->max_read / PAGE_CACHE_SIZE;
|
||||
fc->no_lock = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue