From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, rwheeler@redhat.com, sandeen@redhat.com,
adilger@dilger.ca, lczerner@redhat.com
Subject: [PATCH 1/4] ext4: Use return value from sb_issue_discard()
Date: Mon, 27 Sep 2010 16:09:57 +0200 [thread overview]
Message-ID: <1285596600-28358-2-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1285596600-28358-1-git-send-email-lczerner@redhat.com>
Use return value from sb_issue_discard() as return value in
ext4_issue_discard(). Since sb_issue_discard() may result in more
serious errors than just -EOPNOTSUPP it is worth to inform user of this
function about them to handle error cases properly.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
fs/ext4/mballoc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 66c3535..93eb6c2 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2603,7 +2603,7 @@ int ext4_mb_release(struct super_block *sb)
return 0;
}
-static inline void ext4_issue_discard(struct super_block *sb,
+static inline int ext4_issue_discard(struct super_block *sb,
ext4_group_t block_group, ext4_grpblk_t block, int count)
{
int ret;
@@ -2617,6 +2617,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
}
+ return ret;
}
/*
--
1.7.2.3
next prev parent reply other threads:[~2010-09-27 14:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 14:09 [PATCH 0/4 v. 9] Ext3/Ext4 Batched discard support Lukas Czerner
2010-09-27 14:09 ` Lukas Czerner [this message]
2010-09-27 14:09 ` [PATCH 2/4] Add ioctl FITRIM Lukas Czerner
2010-09-27 14:09 ` [PATCH 3/4] ext4: Add batched discard support for ext4 Lukas Czerner
2010-10-25 18:50 ` Ted Ts'o
2010-10-25 19:08 ` Ted Ts'o
2010-10-26 12:43 ` Lukas Czerner
2010-10-26 14:20 ` Ted Ts'o
2010-10-26 14:36 ` Lukas Czerner
2010-09-27 14:10 ` [PATCH 4/4] ext3: Add batched discard support for ext3 Lukas Czerner
2010-09-27 14:11 ` [PATCH 0/4 v. 9] Ext3/Ext4 Batched discard support - fstrim Lukas Czerner
2010-10-11 17:02 ` [PATCH 0/4 v. 9] Ext3/Ext4 Batched discard support Lukas Czerner
2010-10-25 14:57 ` Ted Ts'o
2010-10-25 16:06 ` Fstrim tool Lukas Czerner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285596600-28358-2-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).