2004-01-23 06:44:52

by Dave Jones

[permalink] [raw]
Subject: logic error in XFS

Yet another misplaced ! by the looks..

Dave

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/xfs/xfs_log_recover.c linux-2.5/fs/xfs/xfs_log_recover.c
--- bk-linus/fs/xfs/xfs_log_recover.c 2003-10-09 01:01:24.000000000 +0100
+++ linux-2.5/fs/xfs/xfs_log_recover.c 2004-01-14 07:06:40.000000000 +0000
@@ -1553,7 +1553,7 @@ xlog_recover_reorder_trans(
case XFS_LI_BUF:
case XFS_LI_6_1_BUF:
case XFS_LI_5_3_BUF:
- if ((!flags & XFS_BLI_CANCEL)) {
+ if (!(flags & XFS_BLI_CANCEL)) {
xlog_recover_insert_item_frontq(&trans->r_itemq,
itemq);
break;


2004-01-23 09:33:37

by Måns Rullgård

[permalink] [raw]
Subject: Re: logic error in XFS

[email protected] writes:

> Yet another misplaced ! by the looks..

Sure looks like it. When is this code encountered?

> diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/xfs/xfs_log_recover.c linux-2.5/fs/xfs/xfs_log_recover.c
> --- bk-linus/fs/xfs/xfs_log_recover.c 2003-10-09 01:01:24.000000000 +0100
> +++ linux-2.5/fs/xfs/xfs_log_recover.c 2004-01-14 07:06:40.000000000 +0000
> @@ -1553,7 +1553,7 @@ xlog_recover_reorder_trans(
> case XFS_LI_BUF:
> case XFS_LI_6_1_BUF:
> case XFS_LI_5_3_BUF:
> - if ((!flags & XFS_BLI_CANCEL)) {
> + if (!(flags & XFS_BLI_CANCEL)) {
> xlog_recover_insert_item_frontq(&trans->r_itemq,
> itemq);
> break;

--
M?ns Rullg?rd
[email protected]

2004-01-23 15:59:27

by Steve Lord

[permalink] [raw]
Subject: Re: logic error in XFS

M?ns Rullg?rd wrote:

>[email protected] writes:
>
>
>
>>Yet another misplaced ! by the looks..
>>
>>
>
>Sure looks like it. When is this code encountered?
>
>

File system recovery, it is going to insert buffer items out of order in
the recovery sequence which means replay could be out of order.
Its been there since around September by the look of it. Definitely should
be the other way around. Thanks Dave.

Steve

>
>
>>diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/xfs/xfs_log_recover.c linux-2.5/fs/xfs/xfs_log_recover.c
>>--- bk-linus/fs/xfs/xfs_log_recover.c 2003-10-09 01:01:24.000000000 +0100
>>+++ linux-2.5/fs/xfs/xfs_log_recover.c 2004-01-14 07:06:40.000000000 +0000
>>@@ -1553,7 +1553,7 @@ xlog_recover_reorder_trans(
>> case XFS_LI_BUF:
>> case XFS_LI_6_1_BUF:
>> case XFS_LI_5_3_BUF:
>>- if ((!flags & XFS_BLI_CANCEL)) {
>>+ if (!(flags & XFS_BLI_CANCEL)) {
>> xlog_recover_insert_item_frontq(&trans->r_itemq,
>> itemq);
>> break;
>>
>>
>
>
>


--
Steve Lord <[email protected]> Tel: 952-882-0619

2004-01-24 00:42:12

by Nathan Scott

[permalink] [raw]
Subject: Re: logic error in XFS

On Fri, Jan 23, 2004 at 06:35:25AM +0000, [email protected] wrote:
> Yet another misplaced ! by the looks..
>

Thanks Dave, your fix looks good to me too. Marcelo, this affects
2.4 too - please apply this patch.

thanks.

> diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/xfs/xfs_log_recover.c linux-2.5/fs/xfs/xfs_log_recover.c
> --- bk-linus/fs/xfs/xfs_log_recover.c 2003-10-09 01:01:24.000000000 +0100
> +++ linux-2.5/fs/xfs/xfs_log_recover.c 2004-01-14 07:06:40.000000000 +0000
> @@ -1553,7 +1553,7 @@ xlog_recover_reorder_trans(
> case XFS_LI_BUF:
> case XFS_LI_6_1_BUF:
> case XFS_LI_5_3_BUF:
> - if ((!flags & XFS_BLI_CANCEL)) {
> + if (!(flags & XFS_BLI_CANCEL)) {
> xlog_recover_insert_item_frontq(&trans->r_itemq,
> itemq);
> break;

--
Nathan