diff options
| author | Ming Lei <ming.lei@canonical.com> | 2013-10-30 07:27:16 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2013-10-30 07:27:16 -0400 |
| commit | bbf023c74dcf380769aec00aedd706a266b7d9ef (patch) | |
| tree | d1c8c07bc226c0742d2cae612c65ecc7d3b1f89d | |
| parent | efbed4dc5857f845d787e406ce85097d1ccc5c4f (diff) | |
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: linux-ext4@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| -rw-r--r-- | fs/ext4/inode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 94aac67b55c9..43015fa69c3a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
| @@ -2423,16 +2423,15 @@ static int ext4_writepages(struct address_space *mapping, | |||
| 2423 | * because that could violate lock ordering on umount | 2423 | * because that could violate lock ordering on umount |
| 2424 | */ | 2424 | */ |
| 2425 | if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) | 2425 | if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) |
| 2426 | return 0; | 2426 | goto out_writepages; |
| 2427 | 2427 | ||
| 2428 | if (ext4_should_journal_data(inode)) { | 2428 | if (ext4_should_journal_data(inode)) { |
| 2429 | struct blk_plug plug; | 2429 | struct blk_plug plug; |
| 2430 | int ret; | ||
| 2431 | 2430 | ||
| 2432 | blk_start_plug(&plug); | 2431 | blk_start_plug(&plug); |
| 2433 | ret = write_cache_pages(mapping, wbc, __writepage, mapping); | 2432 | ret = write_cache_pages(mapping, wbc, __writepage, mapping); |
| 2434 | blk_finish_plug(&plug); | 2433 | blk_finish_plug(&plug); |
| 2435 | return ret; | 2434 | goto out_writepages; |
| 2436 | } | 2435 | } |
| 2437 | 2436 | ||
| 2438 | /* | 2437 | /* |
| @@ -2445,8 +2444,10 @@ static int ext4_writepages(struct address_space *mapping, | |||
| 2445 | * *never* be called, so if that ever happens, we would want | 2444 | * *never* be called, so if that ever happens, we would want |
| 2446 | * the stack trace. | 2445 | * the stack trace. |
| 2447 | */ | 2446 | */ |
| 2448 | if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED)) | 2447 | if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED)) { |
| 2449 | return -EROFS; | 2448 | ret = -EROFS; |
| 2449 | goto out_writepages; | ||
| 2450 | } | ||
| 2450 | 2451 | ||
| 2451 | if (ext4_should_dioread_nolock(inode)) { | 2452 | if (ext4_should_dioread_nolock(inode)) { |
| 2452 | /* | 2453 | /* |
