* [2.6.22.2 review 43/84] "ext4_ext_put_in_cache" uses __u32 to receive physical block number
[not found] ` <20070807204157.GA23028@kroah.com>
@ 2007-08-07 20:47 ` Greg KH
2007-08-07 20:47 ` [2.6.22.2 review 58/84] jbd commit: fix transaction dropping Greg KH
2007-08-07 20:48 ` [2.6.22.2 review 59/84] jbd2 " Greg KH
2 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2007-08-07 20:47 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, akpm, alan, linux-ext4, cmm,
yanzheng
[-- Attachment #1: ext4_ext_put_in_cache-uses-__u32-to-receive-physical-block-number.patch --]
[-- Type: text/plain, Size: 1509 bytes --]
From: Mingming Cao <cmm@us.ibm.com>
Yan Zheng wrote:
> I think I found a bug in ext4/extents.c, "ext4_ext_put_in_cache" uses
> "__u32" to receive physical block number. "ext4_ext_put_in_cache" is
> used in "ext4_ext_get_blocks", it sets ext4 inode's extent cache
> according most recently tree lookup (higher 16 bits of saved physical
> block number are always zero). when serving a mapping request,
> "ext4_ext_get_blocks" first check whether the logical block is in
> inode's extent cache. if the logical block is in the cache and the
> cached region isn't a gap, "ext4_ext_get_blocks" gets physical block
> number by using cached region's physical block number and offset in
> the cached region. as described above, "ext4_ext_get_blocks" may
> return wrong result when there are physical block numbers bigger than
> 0xffffffff.
>
You are right. Thanks for reporting this!
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Cc: Yan Zheng <yanzheng@21cn.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1445,7 +1445,7 @@ int ext4_ext_walk_space(struct inode *in
static void
ext4_ext_put_in_cache(struct inode *inode, __u32 block,
- __u32 len, __u32 start, int type)
+ __u32 len, ext4_fsblk_t start, int type)
{
struct ext4_ext_cache *cex;
BUG_ON(len == 0);
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* [2.6.22.2 review 58/84] jbd commit: fix transaction dropping
[not found] ` <20070807204157.GA23028@kroah.com>
2007-08-07 20:47 ` [2.6.22.2 review 43/84] "ext4_ext_put_in_cache" uses __u32 to receive physical block number Greg KH
@ 2007-08-07 20:47 ` Greg KH
2007-08-07 20:48 ` [2.6.22.2 review 59/84] jbd2 " Greg KH
2 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2007-08-07 20:47 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, akpm, alan, dev, jack,
linux-ext4
[-- Attachment #1: jbd-commit-fix-transaction-dropping.patch --]
[-- Type: text/plain, Size: 930 bytes --]
From: Jan Kara <jack@suse.cz>
We have to check that also the second checkpoint list is non-empty before
dropping the transaction.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/jbd/commit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -887,7 +887,8 @@ restart_loop:
journal->j_committing_transaction = NULL;
spin_unlock(&journal->j_state_lock);
- if (commit_transaction->t_checkpoint_list == NULL) {
+ if (commit_transaction->t_checkpoint_list == NULL &&
+ commit_transaction->t_checkpoint_io_list == NULL) {
__journal_drop_transaction(journal, commit_transaction);
} else {
if (journal->j_checkpoint_transactions == NULL) {
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* [2.6.22.2 review 59/84] jbd2 commit: fix transaction dropping
[not found] ` <20070807204157.GA23028@kroah.com>
2007-08-07 20:47 ` [2.6.22.2 review 43/84] "ext4_ext_put_in_cache" uses __u32 to receive physical block number Greg KH
2007-08-07 20:47 ` [2.6.22.2 review 58/84] jbd commit: fix transaction dropping Greg KH
@ 2007-08-07 20:48 ` Greg KH
2 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2007-08-07 20:48 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, akpm, alan, dev, jack,
linux-ext4
[-- Attachment #1: jbd2-commit-fix-transaction-dropping.patch --]
[-- Type: text/plain, Size: 938 bytes --]
From: Jan Kara <jack@suse.cz>
We have to check that also the second checkpoint list is non-empty before
dropping the transaction.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/jbd2/commit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -896,7 +896,8 @@ restart_loop:
journal->j_committing_transaction = NULL;
spin_unlock(&journal->j_state_lock);
- if (commit_transaction->t_checkpoint_list == NULL) {
+ if (commit_transaction->t_checkpoint_list == NULL &&
+ commit_transaction->t_checkpoint_io_list == NULL) {
__jbd2_journal_drop_transaction(journal, commit_transaction);
} else {
if (journal->j_checkpoint_transactions == NULL) {
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-07 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070807204034.882009319@mini.kroah.org>
[not found] ` <20070807204157.GA23028@kroah.com>
2007-08-07 20:47 ` [2.6.22.2 review 43/84] "ext4_ext_put_in_cache" uses __u32 to receive physical block number Greg KH
2007-08-07 20:47 ` [2.6.22.2 review 58/84] jbd commit: fix transaction dropping Greg KH
2007-08-07 20:48 ` [2.6.22.2 review 59/84] jbd2 " Greg KH
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).