Fix ext3 warning for unused var
PATCH 1/1 Fix ext3 warning for unused var
From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Fix a gcc warning about an unused var. Introduced in commit 275abf5b06676ca057cf3e15f0d027eafcb204a0, after 2.6.14-rc2. I just verified this is still current as of commit 829841146878e082613a49581ae252c071057c23.
Can please someone merge this? It's the 3rd time I send it.
---
fs/ext3/super.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ext3/super.c +2 -0
@@ -513,7 +513,9 @@ static void ext3_clear_inode(struct inodstatic int ext3_show_options (struct seq_file *seq,struct vfsmount *vfs) {struct super_block *sb = vfs->mnt_sb; +#if defined(CONFIG_QUOTA )struct ext3_sb_info *sbi =EXT3_SB (sb); +#endif if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_JOURNAL_DATA )seq_puts (seq,",data=journal" );
Quoted 2 lines · Paolo 'Blaisorblade' Giarrusso
Can please someone merge this? It's the 3rd time I send it.
I don't like #ifdef's in code.
You could just have split up the quota-specific stuff into a function of their own: "ext3_show_quota_options()". The patch might have been larger, but it would actually clean up the code rather than make it uglier.
Warnings are not a reason for ugly code.
Linus
Quoted 11 lines · Linus Torvalds
Quoted 3 lines · Paolo 'Blaisorblade' Giarrusso
Can please someone merge this? It's the 3rd time I send it.
I don't like #ifdef's in code.
You could just have split up the quota-specific stuff into a function of their own: "
ext3_show_quota_options()". The patch might have been larger, but it would actually clean up the code rather than make it uglier.
Quoted 11 lines
Warnings are not a reason for ugly code.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Someone needs to fix fsck.ext3 while they are at it so it doesn't barf when reading from reisferfs filesystems and return a command return of > 2 during scanning of parttions during bootup. This looks like some sort of anti-competitive crap and it doesn't belong in fsck.ext3 since reiserfs is in the kernel.
J
Quoted 5 lines · jmerkey
Someone needs to fix fsck.ext3 while they are at it so it doesn't barf when reading from reisferfs filesystems and return a command return of > 2 during scanning of parttions during bootup. This looks like some sort of anti-competitive crap and it doesn't belong in fsck.ext3 since reiserfs is in the kernel.
Huh? WTF are you trying to feed reiserfs to fsck.ext3 and just what do you expect it to do?
Quoted 12 lines · Al Viro
Quoted 3 lines · jmerkey
Someone needs to fix fsck.ext3 while they are at it so it doesn't barf when reading from reisferfs filesystems and return a command return of > 2 during scanning of parttions during bootup. This looks like some sort of anti-competitive crap and it doesn't belong in fsck.ext3 since reiserfs is in the kernel.
Huh? WTF are you trying to feed reiserfs to fsck.ext3 and just what do you expect it to do?
If they all use the same on disk formats as their basic structure, fsck should not return gt > 1 due to misinterpreting reiser on-disk structures. It should say "oh not one of mine, skipping". Instead it returns an error claiming massive corruption, and halts the system. I just upgraded my wifes computer from Suse to RedHat FC4 and when it hits the reiser partitions, the whole system explodes due to fsck.ext3 misrecognizing reiser partitions. I had to modify rc.sysinit and blank the partitions with fdisk to get it to install. After it installed, I recreated the partitions (after writing down what they were in the first place for block #'s etc.) and disabled rc.sysinit checks. This is busted. Hans needs to fix fsck.ext3 and submit a patch or redhat does.
J
Quoted 1 line · jmerkey
If they all use the same on disk formats as their basic structure,
ext3 and reiserfs? No, they do not.
Quoted 7 lines
fsck
should not return gt > 1 due to misinterpreting reiser on-disk structures. It should say "oh not one of mine, skipping". Instead it returns an error claiming massive corruption, and halts the system. I just upgraded my wifes computer from Suse to RedHat FC4 and when it hits the reiser partitions, the whole system explodes due to fsck.ext3 misrecognizing reiser partitions.
Since when does fsck run fsck.ext3 on filesystems that are not marked as ext3 in /etc/fstab?
Quoted 5 lines
I had to modify rc.sysinit and blank
the partitions with fdisk to get it to install. After it installed, I recreated the partitions (after writing down what they were in the first place for block #'s etc.) and disabled rc.sysinit checks. This is busted. Hans needs to fix fsck.ext3 and submit a patch or redhat does.
Sorry, but I doubt that Hans or anybody in RH knows how to patch wetware, let alone one as messed up as yours.
Quoted 20 lines · Al Viro
Quoted 3 lines · jmerkey
If they all use the same on disk formats as their basic structure,
ext3 and reiserfs? No, they do not.
Quoted 3 lines
fsck should not return gt > 1 due to misinterpreting reiser on-disk structures. It should say "oh not one of mine, skipping". Instead it returns an error claiming massive corruption, and halts the system. I just upgraded my wifes computer from Suse to RedHat FC4 and when it hits the reiser partitions, the whole system explodes due to fsck.ext3 misrecognizing reiser partitions.
Since when does fsck run fsck.ext3 on filesystems that are not marked as ext3 in
/etc/fstab?
Quoted 6 lines
Quoted 3 lines
I had to modify rc.sysinit and blank the partitions with fdisk to get it to install. After it installed, I recreated the partitions (after writing down what they were in the first place for block #'s etc.) and disabled rc.sysinit checks. This is busted. Hans needs to fix fsck.ext3 and submit a patch or redhat does.
Sorry, but I doubt that Hans or anybody in RH knows how to patch
---> wetware, <----
Is this the new "official" non-official slang word for Suse Linux?
Jeff
Quoted 4 lines
let alone one as messed up as yours.
-
Quoted 6 lines · jmerkey
Quoted 2 lines
Sorry, but I doubt that Hans or anybody in RH knows how to patch
---> wetware, <----
Is this the new "official" non-official slang word for Suse Linux?
That's fairly old and unless the contents of your skull is even weirder than I ever thought, the answer's "no".
Quoted 1 line
Quoted 1 line
let alone one as messed up as yours.
Quoted 3 lines · jmerkey
---> wetware, <----
Is this the new "official" non-official slang word for Suse Linux?
No.
Quoted 1 line · jmerkey
Al Viro wrote:
[...]
Quoted 5 lines
Quoted 1 line
Sorry, but I doubt that Hans or anybody in RH knows how to patch
---> wetware, <----
Is this the new "official" non-official slang word for Suse Linux?
Not hardly Jeff, where have you been? Wetware refers to the brain of the individual being targeted.
Signature · 8 lines
Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.35% setiathome rank, not too shabby for a WV hillbilly Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
Quoted 2 lines · Al Viro
Since when does fsck run fsck.ext3 on filesystems that are not marked as ext3 in
/etc/fstab?
Part of the problem is that if a partition is formatted with mkfs.ext3, it gets an ext3 magic number scribbled at a known offset into the partition. If you then reformat it with mkfs.reiserfs, that scribbles a different magic number elsewhere on the partition, but leaves the ext3 magic number intact. As a result, if you forget to update /etc/fstab, fsck.ext3 checks for its magic number, finds it, concludes it's probably an ext3, and then discovers that everything is totally scrogged.....
Yes, it's pilot error, but it's definitely hitting your feet with much larger caliber rounds than you would have expected... :)
Quoted 17 lines · [email protected] wrote:
Quoted 4 lines · Al Viro
Since when does fsck run fsck.ext3 on filesystems that are not marked as ext3 in
/etc/fstab?Part of the problem is that if a partition is formatted with mkfs.ext3, it gets an ext3 magic number scribbled at a known offset into the partition. If you then reformat it with mkfs.reiserfs, that scribbles a different magic number elsewhere on the partition, but leaves the ext3 magic number intact. As a result, if you forget to update
/etc/fstab, fsck.ext3 checks for its magic number, finds it, concludes it's probably an ext3, and then discovers that everything is totally scrogged.....
Quoted 4 lines
Yes, it's pilot error, but it's definitely hitting your feet with much larger caliber rounds than you would have expected... :)
Yep. Needs to get fixed because when you upgrade from a reiserfs system and try to keep the reiserfs partitions and add a new hard drive (+1) to
an existing system, you run the risk of corrupting resiferfs partitions.
Jeff
Quoted 6 lines · jmerkey
Yep. Needs to get fixed because when you upgrade from a reiserfs
system and try to keep the reiserfs partitions and add a new hard drive (+1) to
an existing system, you run the risk of corrupting resiferfs partitions. Jeff
Newer mkreiserfs overwrites the beginning of the partition to avoid that. Probably yours was created with a very old one.
-Andi
Quoted 11 lines · Linus Torvalds
Quoted 2 lines · Paolo 'Blaisorblade' Giarrusso
Can please someone merge this? It's the 3rd time I send it.
I don't like #ifdef's in code.
You could just have split up the quota-specific stuff into a function of their own: "
ext3_show_quota_options()". The patch might have been larger, but it would actually clean up the code rather than make it uglier.Warnings are not a reason for ugly code.
Fix compile warning in ext3 quota code.
---
fs/ext3/super.c | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-)
fs/ext3/super.c +16 -10
@@ -510,19 +510,11 @@ static void ext3_clear_inode(struct inodkfree (rsv); } -static int ext3_show_options (struct seq_file *seq,struct vfsmount *vfs) +static inline void ext3_show_quota_options (struct seq_file *seq,struct super_block *sb) { -struct super_block *sb = vfs->mnt_sb; +#if defined(CONFIG_QUOTA )struct ext3_sb_info *sbi =EXT3_SB (sb); -if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_JOURNAL_DATA ) -seq_puts (seq,",data=journal" ); -else if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_ORDERED_DATA ) -seq_puts (seq,",data=ordered" ); -else if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_WRITEBACK_DATA ) -seq_puts (seq,",data=writeback" ); - -#if defined(CONFIG_QUOTA )if (sbi->s_jquota_fmt)seq_printf (seq,",jqfmt=%s" , (sbi->s_jquota_fmt ==QFMT_VFS_OLD ) ?"vfsold" :"vfsv0" );
@@ -539,6 +531,20 @@ static int ext3_show_options(struct seq_if (sbi->s_mount_opt &EXT3_MOUNT_GRPQUOTA )seq_puts (seq,",grpquota" );#endif +} + +static int ext3_show_options (struct seq_file *seq,struct vfsmount *vfs) +{ +struct super_block *sb = vfs->mnt_sb; + +if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_JOURNAL_DATA ) +seq_puts (seq,",data=journal" ); +else if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_ORDERED_DATA ) +seq_puts (seq,",data=ordered" ); +else if (test_opt (sb,DATA_FLAGS ) ==EXT3_MOUNT_WRITEBACK_DATA ) +seq_puts (seq,",data=writeback" ); + +ext3_show_quota_options (seq, sb);return 0 ; }
Signature · 2 lines
Peter Osterlund - [email protected] http://web.telia.com/~u89404340