* [PATCH] fuse: Don't do file_update_time for write_operation.
@ 2013-03-29 3:02 majianpeng
2013-05-02 15:07 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2013-03-29 3:02 UTC (permalink / raw)
To: miklos; +Cc: fuse-devel, linux-kernel
For direct-write and normal-write operations, after write they will call fuse_invalidate_attr.
So it's make no sense to call file_update_time before writing.
In function file_update_time, there is other thing which update version of
inode.For this i am not sure.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
fs/fuse/file.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 34b80ba..214279c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -988,10 +988,6 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
if (err)
goto out;
- err = file_update_time(file);
- if (err)
- goto out;
-
if (file->f_flags & O_DIRECT) {
written = generic_file_direct_write(iocb, iov, &nr_segs,
pos, &iocb->ki_pos,
--
1.8.2.rc2.4.g7799588
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fuse: Don't do file_update_time for write_operation.
2013-03-29 3:02 [PATCH] fuse: Don't do file_update_time for write_operation majianpeng
@ 2013-05-02 15:07 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2013-05-02 15:07 UTC (permalink / raw)
To: majianpeng; +Cc: fuse-devel, linux-kernel
On Fri, Mar 29, 2013 at 4:02 AM, majianpeng <majianpeng@gmail.com> wrote:
> For direct-write and normal-write operations, after write they will call fuse_invalidate_attr.
> So it's make no sense to call file_update_time before writing.
>
> In function file_update_time, there is other thing which update version of
> inode.For this i am not sure.
file_update_time will skip the actual file update anyway due to
S_NOCMTIME. And when we will do cached writes we actually need the
time updates. So I'm not applying this one.
Thanks,
Miklos
>
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> fs/fuse/file.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 34b80ba..214279c 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -988,10 +988,6 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
> if (err)
> goto out;
>
> - err = file_update_time(file);
> - if (err)
> - goto out;
> -
> if (file->f_flags & O_DIRECT) {
> written = generic_file_direct_write(iocb, iov, &nr_segs,
> pos, &iocb->ki_pos,
> --
> 1.8.2.rc2.4.g7799588
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-02 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 3:02 [PATCH] fuse: Don't do file_update_time for write_operation majianpeng
2013-05-02 15:07 ` Miklos Szeredi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox