* [PATCH] pipe: skip file_update_time on frozen fs
@ 2013-11-25 9:43 Dmitry Monakhov
2013-11-25 22:17 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Monakhov @ 2013-11-25 9:43 UTC (permalink / raw)
To: linux-fsdevel; +Cc: Dmitry Monakhov
Pipe has no data associated with fs so it is not good idea to block
pipe_write() if FS is frozen, but we can not update file's time on such
filesystem. Let's use same idea as we use in touch_time().
https://bugzilla.kernel.org/show_bug.cgi?id=65701
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
fs/pipe.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index d2c45e1..a9acd9a 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -663,10 +663,11 @@ out:
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
}
- if (ret > 0) {
+ if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
int err = file_update_time(filp);
if (err)
ret = err;
+ sb_end_write(file_inode(filp)->i_sb);
}
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pipe: skip file_update_time on frozen fs
2013-11-25 9:43 Dmitry Monakhov
@ 2013-11-25 22:17 ` Jan Kara
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2013-11-25 22:17 UTC (permalink / raw)
To: Dmitry Monakhov; +Cc: linux-fsdevel
On Mon 25-11-13 13:43:23, Dmitry Monakhov wrote:
> Pipe has no data associated with fs so it is not good idea to block
> pipe_write() if FS is frozen, but we can not update file's time on such
> filesystem. Let's use same idea as we use in touch_time().
>
> https://bugzilla.kernel.org/show_bug.cgi?id=65701
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
BTW, please send it to Al Viro. He should be the right guy to merge the
patch and I don't think he is scanning mailing lists for fixes often...
Honza
> ---
> fs/pipe.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/pipe.c b/fs/pipe.c
> index d2c45e1..a9acd9a 100644
> --- a/fs/pipe.c
> +++ b/fs/pipe.c
> @@ -663,10 +663,11 @@ out:
> wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM);
> kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
> }
> - if (ret > 0) {
> + if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
> int err = file_update_time(filp);
> if (err)
> ret = err;
> + sb_end_write(file_inode(filp)->i_sb);
> }
> return ret;
> }
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pipe: skip file_update_time on frozen fs
@ 2013-11-26 7:59 Dmitry Monakhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Monakhov @ 2013-11-26 7:59 UTC (permalink / raw)
To: Al Viro; +Cc: linux-fsdevel, Jan Kara
Pipe has no data associated with fs so it is not good idea to block
pipe_write() if FS is frozen, but we can not update file's time on such
filesystem. Let's use same idea as we use in touch_atime().
https://bugzilla.kernel.org/show_bug.cgi?id=65701
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Jan Kara <jack@suse.cz>
---
fs/pipe.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index d2c45e1..a9acd9a 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -663,10 +663,11 @@ out:
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
}
- if (ret > 0) {
+ if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
int err = file_update_time(filp);
if (err)
ret = err;
+ sb_end_write(file_inode(filp)->i_sb);
}
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-26 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26 7:59 [PATCH] pipe: skip file_update_time on frozen fs Dmitry Monakhov
-- strict thread matches above, loose matches on Subject: below --
2013-11-25 9:43 Dmitry Monakhov
2013-11-25 22:17 ` Jan Kara
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.