* [PATCH 1/2] Use negative error code
@ 2010-09-10 18:51 Lukas Czerner
2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
2010-09-20 13:34 ` [PATCH 1/2] Use negative error code Ted Ts'o
0 siblings, 2 replies; 4+ messages in thread
From: Lukas Czerner @ 2010-09-10 18:51 UTC (permalink / raw)
To: linux-ext4; +Cc: sandeen, tytso, adilger, lczerner
sb_issue_discard() is returning negative error code, so check for
-EOPNOTSUPP.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
fs/ext4/mballoc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 4b4ad4b..ec2793a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2567,7 +2567,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
trace_ext4_discard_blocks(sb,
(unsigned long long) discard_block, count);
ret = sb_issue_discard(sb, discard_block, count);
- if (ret == EOPNOTSUPP) {
+ if (ret == -EOPNOTSUPP) {
ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
}
--
1.7.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard()
2010-09-10 18:51 [PATCH 1/2] Use negative error code Lukas Czerner
@ 2010-09-10 18:51 ` Lukas Czerner
2010-09-20 13:44 ` Ted Ts'o
2010-09-20 13:34 ` [PATCH 1/2] Use negative error code Ted Ts'o
1 sibling, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2010-09-10 18:51 UTC (permalink / raw)
To: linux-ext4; +Cc: sandeen, tytso, adilger, lczerner
We can't hold spinlock because we can get rescheduled.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
fs/ext4/mballoc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index ec2793a..c214cfc 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4640,12 +4640,12 @@ do_more:
* with group lock held. generate_buddy look at
* them with group lock_held
*/
+ if (test_opt(sb, DISCARD))
+ ext4_issue_discard(sb, block_group, bit, count);
ext4_lock_group(sb, block_group);
mb_clear_bits(bitmap_bh->b_data, bit, count);
mb_free_blocks(inode, &e4b, bit, count);
ext4_mb_return_to_preallocation(inode, &e4b, block, count);
- if (test_opt(sb, DISCARD))
- ext4_issue_discard(sb, block_group, bit, count);
}
ret = ext4_free_blks_count(sb, gdp) + count;
--
1.7.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Use negative error code
2010-09-10 18:51 [PATCH 1/2] Use negative error code Lukas Czerner
2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
@ 2010-09-20 13:34 ` Ted Ts'o
1 sibling, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2010-09-20 13:34 UTC (permalink / raw)
To: Lukas Czerner; +Cc: linux-ext4, sandeen, adilger
On Fri, Sep 10, 2010 at 08:51:30PM +0200, Lukas Czerner wrote:
> sb_issue_discard() is returning negative error code, so check for
> -EOPNOTSUPP.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Thanks, added to the ext4 patch queue.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard()
2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
@ 2010-09-20 13:44 ` Ted Ts'o
0 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2010-09-20 13:44 UTC (permalink / raw)
To: Lukas Czerner; +Cc: linux-ext4, sandeen, adilger
On Fri, Sep 10, 2010 at 08:51:31PM +0200, Lukas Czerner wrote:
> We can't hold spinlock because we can get rescheduled.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Thanks, added to the ext4 patch queue. For both patches I adjusted
the patch summary to be a bit more descriptive:
0dc23a4 ext4: don't hold spinlock while calling ext4_issue_discard()
9c54307 ext4: Check for negative error code from sb_issue_discard
It makes it easier to figure out which patches are which when you use
"git log --oneline".
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-20 13:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 18:51 [PATCH 1/2] Use negative error code Lukas Czerner
2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
2010-09-20 13:44 ` Ted Ts'o
2010-09-20 13:34 ` [PATCH 1/2] Use negative error code Ted Ts'o
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.