2007-11-20 20:36:41

by Dave Bailey

[permalink] [raw]
Subject: Re: Problem with ufs nextstep in 2.6.18 (debian)

This problem has been around since kernel 2.6.16, and I see it in
2.6.23.1-10.fc7. It occurs in the ufs_check_page function of ufs/dir.c
at the Espan test, which seems unnecessary for NextStep/OpenStep
files systems. The following patch preserves the test for other file
systems and makes the mount useful for NextStep/OpenStep:
(against the 2.6.23.1-10.fc7 source tree)

dsb@Zeno-Dyn[1012]$ diff dir.c dir.c.orig
108,110d107
< unsigned mnext = UFS_SB(sb)->s_mount_opt &
< (UFS_MOUNT_UFSTYPE_NEXTSTEP || UFS_MOUNT_UFSTYPE_NEXTSTEP_CD ||
< UFS_MOUNT_UFSTYPE_OPENSTEP);
131c128
< if ((mnext == 0) & (((offs + rec_len - 1) ^ offs) &
~chunk_mask))
---
> if (((offs + rec_len - 1) ^ offs) & ~chunk_mask)


2007-11-21 15:38:10

by Jan Kara

[permalink] [raw]
Subject: Re: Problem with ufs nextstep in 2.6.18 (debian)

> This problem has been around since kernel 2.6.16, and I see it in
> 2.6.23.1-10.fc7. It occurs in the ufs_check_page function of ufs/dir.c
> at the Espan test, which seems unnecessary for NextStep/OpenStep
> files systems. The following patch preserves the test for other file
> systems and makes the mount useful for NextStep/OpenStep:
> (against the 2.6.23.1-10.fc7 source tree)
>
> dsb@Zeno-Dyn[1012]$ diff dir.c dir.c.orig
> 108,110d107
> < unsigned mnext = UFS_SB(sb)->s_mount_opt &
> < (UFS_MOUNT_UFSTYPE_NEXTSTEP || UFS_MOUNT_UFSTYPE_NEXTSTEP_CD ||
> < UFS_MOUNT_UFSTYPE_OPENSTEP);
> 131c128
> < if ((mnext == 0) & (((offs + rec_len - 1) ^ offs) &
> ~chunk_mask))
> ---
> > if (((offs + rec_len - 1) ^ offs) & ~chunk_mask)
Thanks for your contribution but we cannot take it as is - at least
Signed-off-by line is missing and the patch should also be in unified
diff format. Please read linux/Documentation/SubmittingPatches...
Thanks.

Honza
--
Jan Kara <[email protected]>
SuSE CR Labs

2007-11-22 04:19:19

by Evgeniy Dushistov

[permalink] [raw]
Subject: Re: Problem with ufs nextstep in 2.6.18 (debian)

On Tue, Nov 20, 2007 at 12:29:03PM -0800, Dave Bailey wrote:
> This problem has been around since kernel 2.6.16, and I see it in
> 2.6.23.1-10.fc7. It occurs in the ufs_check_page function of ufs/dir.c
> at the Espan test, which seems unnecessary for NextStep/OpenStep
> files systems. The following patch preserves the test for other file
> systems and makes the mount useful for NextStep/OpenStep:
> (against the 2.6.23.1-10.fc7 source tree)
>
> dsb@Zeno-Dyn[1012]$ diff dir.c dir.c.orig
> 108,110d107
> < unsigned mnext = UFS_SB(sb)->s_mount_opt &
> < (UFS_MOUNT_UFSTYPE_NEXTSTEP || UFS_MOUNT_UFSTYPE_NEXTSTEP_CD ||
> < UFS_MOUNT_UFSTYPE_OPENSTEP);
> 131c128
> < if ((mnext == 0) & (((offs + rec_len - 1) ^ offs) &
> ~chunk_mask))
> ---
> > if (((offs + rec_len - 1) ^ offs) & ~chunk_mask)

This fixes only symptom, not illness.
This check represent what code think about filesystem layout.
On what actually kind of UFS system did you test this patch?
When I sometime ago fixed similar issue for openstep ufs,
actully this was darwin's ufs which has the same layout,
I just set s_dirblksize to right value, may be for
UFS_MOUNT_UFSTYPE_NEXTSTEP, UFS_MOUNT_UFSTYPE_NEXTSTEP_CD you need
do the same, see TODO items in fs/ufs/super.c.

--
/Evgeniy