* [PATCH] reiserfs: enable attrs by default if saf
@ 2005-06-29 22:53 Jeff Mahoney
2005-06-30 10:13 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Mahoney @ 2005-06-29 22:53 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, Linux Kernel Mailing List
The following patch enables attrs by default if the reiserfs_attrs_cleared
bit is set in the superblock. This allows chattr-type attrs to be used
without any further action by the user.
Please apply.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
diff -ruNpX dontdiff linux-2.6.12-rc6/fs/reiserfs/super.c linux-2.6.12-rc6.devel/fs/reiserfs/super.c
--- linux-2.6.12-rc6/fs/reiserfs/super.c 2005-06-13 14:34:58.000000000 -0400
+++ linux-2.6.12-rc6.devel/fs/reiserfs/super.c 2005-06-22 17:34:55.000000000 -0400
@@ -884,6 +884,8 @@ static void handle_attrs( struct super_b
reiserfs_warning(s, "reiserfs: cannot support attributes until flag is set in super-block" );
REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
}
+ } else if (le32_to_cpu( rs -> s_flags ) & reiserfs_attrs_cleared) {
+ REISERFS_SB(s)->s_mount_opt |= REISERFS_ATTRS;
}
}
--
Jeff Mahoney
SuSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] reiserfs: enable attrs by default if saf
2005-06-29 22:53 [PATCH] reiserfs: enable attrs by default if saf Jeff Mahoney
@ 2005-06-30 10:13 ` Jens Axboe
2005-06-30 13:23 ` Jeff Mahoney
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2005-06-30 10:13 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel Mailing List
On Wed, Jun 29 2005, Jeff Mahoney wrote:
>
> The following patch enables attrs by default if the reiserfs_attrs_cleared
> bit is set in the superblock. This allows chattr-type attrs to be used
> without any further action by the user.
>
> Please apply.
>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
>
> diff -ruNpX dontdiff linux-2.6.12-rc6/fs/reiserfs/super.c linux-2.6.12-rc6.devel/fs/reiserfs/super.c
> --- linux-2.6.12-rc6/fs/reiserfs/super.c 2005-06-13 14:34:58.000000000 -0400
> +++ linux-2.6.12-rc6.devel/fs/reiserfs/super.c 2005-06-22 17:34:55.000000000 -0400
> @@ -884,6 +884,8 @@ static void handle_attrs( struct super_b
> reiserfs_warning(s, "reiserfs: cannot support attributes until flag is set in super-block" );
> REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
> }
> + } else if (le32_to_cpu( rs -> s_flags ) & reiserfs_attrs_cleared) {
> + REISERFS_SB(s)->s_mount_opt |= REISERFS_ATTRS;
> }
> }
Except rs isn't initialized there, causing a compile warning and a crash
booting the resulting kernel when reiser mounts...
Signed-off-by: Jens Axboe <axboe@suse.de>
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1053,10 +1053,9 @@ static void handle_barrier_mode(struct s
static void handle_attrs( struct super_block *s )
{
- struct reiserfs_super_block * rs;
+ struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s);
if( reiserfs_attrs( s ) ) {
- rs = SB_DISK_SUPER_BLOCK (s);
if( old_format_only(s) ) {
reiserfs_warning(s, "reiserfs: cannot support attributes on 3.5.x disk format" );
REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] reiserfs: enable attrs by default if saf
2005-06-30 10:13 ` Jens Axboe
@ 2005-06-30 13:23 ` Jeff Mahoney
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Mahoney @ 2005-06-30 13:23 UTC (permalink / raw)
To: Jens Axboe; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel Mailing List
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Doh. Thanks.
- -Jeff
Jens Axboe wrote:
> On Wed, Jun 29 2005, Jeff Mahoney wrote:
>> The following patch enables attrs by default if the reiserfs_attrs_cleared
>> bit is set in the superblock. This allows chattr-type attrs to be used
>> without any further action by the user.
>>
>> Please apply.
>>
>>Signed-off-by: Jeff Mahoney <jeffm@suse.com>
>>
>>diff -ruNpX dontdiff linux-2.6.12-rc6/fs/reiserfs/super.c linux-2.6.12-rc6.devel/fs/reiserfs/super.c
>>--- linux-2.6.12-rc6/fs/reiserfs/super.c 2005-06-13 14:34:58.000000000 -0400
>>+++ linux-2.6.12-rc6.devel/fs/reiserfs/super.c 2005-06-22 17:34:55.000000000 -0400
>>@@ -884,6 +884,8 @@ static void handle_attrs( struct super_b
>> reiserfs_warning(s, "reiserfs: cannot support attributes until flag is set in super-block" );
>> REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
>> }
>>+ } else if (le32_to_cpu( rs -> s_flags ) & reiserfs_attrs_cleared) {
>>+ REISERFS_SB(s)->s_mount_opt |= REISERFS_ATTRS;
>> }
>> }
>
> Except rs isn't initialized there, causing a compile warning and a crash
> booting the resulting kernel when reiser mounts...
>
> Signed-off-by: Jens Axboe <axboe@suse.de>
>
> diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
> --- a/fs/reiserfs/super.c
> +++ b/fs/reiserfs/super.c
> @@ -1053,10 +1053,9 @@ static void handle_barrier_mode(struct s
>
> static void handle_attrs( struct super_block *s )
> {
> - struct reiserfs_super_block * rs;
> + struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s);
>
> if( reiserfs_attrs( s ) ) {
> - rs = SB_DISK_SUPER_BLOCK (s);
> if( old_format_only(s) ) {
> reiserfs_warning(s, "reiserfs: cannot support attributes on 3.5.x disk format" );
> REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
>
- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCw/JTLPWxlyuTD7IRAgM4AJ9Z12KyHZqvqeYEM1SySO7Dg/2vWwCfaH7Y
qz/pAeg2gy1JigcIbgbbghA=
=LHPR
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-30 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 22:53 [PATCH] reiserfs: enable attrs by default if saf Jeff Mahoney
2005-06-30 10:13 ` Jens Axboe
2005-06-30 13:23 ` Jeff Mahoney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox