[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1310171531040.3212@localhost.localdomain>
Date: Thu, 17 Oct 2013 15:31:34 +0200 (CEST)
From: Lukáš Czerner <lczerner@...hat.com>
To: Ming Lei <ming.lei@...onical.com>
cc: linux-kernel@...r.kernel.org, Jan Kara <jack@...e.cz>,
Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] ext4: pair trace_ext4_writepages &
trace_ext4_writepages_result
On Thu, 17 Oct 2013, Ming Lei wrote:
> Date: Thu, 17 Oct 2013 20:28:46 +0800
> From: Ming Lei <ming.lei@...onical.com>
> To: linux-kernel@...r.kernel.org
> Cc: Jan Kara <jack@...e.cz>, Ming Lei <ming.lei@...onical.com>,
> Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org,
> "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
> Subject: [PATCH] ext4: pair trace_ext4_writepages &
> trace_ext4_writepages_result
>
> Pair the two trace events to make troubeshooting writepages
> easier, and it should be more convinient to write a simple script
> to parse the traces.
>
> Cc: Ted Tso <tytso@....edu>
> Cc: linux-ext4@...r.kernel.org
> Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
> Cc: Jan Kara <jack@...e.cz>
> Signed-off-by: Ming Lei <ming.lei@...onical.com>
It looks good.
Thanks!
Reviewed-by: Lukas Czerner <lczerner@...hat.com>
> ---
> fs/ext4/inode.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 32beaa4..0ad73d4 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2420,16 +2420,15 @@ static int ext4_writepages(struct address_space *mapping,
> * because that could violate lock ordering on umount
> */
> if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
> - return 0;
> + goto out_writepages;
>
> if (ext4_should_journal_data(inode)) {
> struct blk_plug plug;
> - int ret;
>
> blk_start_plug(&plug);
> ret = write_cache_pages(mapping, wbc, __writepage, mapping);
> blk_finish_plug(&plug);
> - return ret;
> + goto out_writepages;
> }
>
> /*
> @@ -2442,8 +2441,10 @@ static int ext4_writepages(struct address_space *mapping,
> * *never* be called, so if that ever happens, we would want
> * the stack trace.
> */
> - if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED))
> - return -EROFS;
> + if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED)) {
> + ret = -EROFS;
> + goto out_writepages;
> + }
>
> if (ext4_should_dioread_nolock(inode)) {
> /*
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists