* [PATCH] reiserfs/xattr fix
@ 2004-08-27 16:06 Andries.Brouwer
2004-08-27 18:04 ` Linus Torvalds
0 siblings, 1 reply; 7+ messages in thread
From: Andries.Brouwer @ 2004-08-27 16:06 UTC (permalink / raw)
To: akpm, torvalds; +Cc: linux-kernel
Yesterday or so I wrote:
[Ha, now that I write about the same md5sum: is it well-known
that reiserfs was/is broken? This is what I noticed yesterday
on 2.6.7, have not yet investigated it closely, except for
verifying that coinciding r5 hash is involved.
# mount /dev/xxx /mnt -t reiserfs
# cd /mnt
# echo hoi > ml
# cat na
hoi
# ls -li ml na
9 -rw-r--r-- 1 root root 4 2004-08-25 17:53 ml
9 -rw-r--r-- 1 root root 4 2004-08-25 17:53 na
# rm na
# cat ml
cat: ml: No such file or directory
]
This same bug exists on 2.6.8.1. It is fixed by the patch below.
Andries
diff -uprN -X /linux/dontdiff a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
--- a/fs/reiserfs/xattr.c 2004-06-24 17:11:20.000000000 +0200
+++ b/fs/reiserfs/xattr.c 2004-08-27 17:54:39.000000000 +0200
@@ -1235,7 +1235,13 @@ reiserfs_xattr_unregister_handlers (void
static int
xattr_lookup_poison (struct dentry *dentry, struct qstr *q1, struct qstr *name)
{
- struct dentry *priv_root = REISERFS_SB(dentry->d_sb)->priv_root;
+ struct dentry *priv_root;
+
+ /* first the ordinary comparison */
+ if (q1->len != name->len || memcmp(q1->name, name->name, name->len))
+ return -ENOENT;
+ /* when found, reject if private */
+ priv_root = REISERFS_SB(dentry->d_sb)->priv_root;
if (name->len == priv_root->d_name.len &&
name->hash == priv_root->d_name.hash &&
!memcmp (name->name, priv_root->d_name.name, name->len)) {
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] reiserfs/xattr fix 2004-08-27 16:06 [PATCH] reiserfs/xattr fix Andries.Brouwer @ 2004-08-27 18:04 ` Linus Torvalds 2004-08-28 1:19 ` [PATCH] remove unused ext2_panic Andries Brouwer 0 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2004-08-27 18:04 UTC (permalink / raw) To: Andries.Brouwer; +Cc: akpm, linux-kernel On Fri, 27 Aug 2004 Andries.Brouwer@cwi.nl wrote: > > This same bug exists on 2.6.8.1. It is fixed by the patch below. Fixed (slightly differently) in current -BK. Thanks, Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] remove unused ext2_panic 2004-08-27 18:04 ` Linus Torvalds @ 2004-08-28 1:19 ` Andries Brouwer 2004-08-28 1:58 ` Linus Torvalds 0 siblings, 1 reply; 7+ messages in thread From: Andries Brouwer @ 2004-08-28 1:19 UTC (permalink / raw) To: Linus Torvalds; +Cc: Andries.Brouwer, akpm, linux-kernel On Fri, Aug 27, 2004 at 11:04:59AM -0700, Linus Torvalds wrote: > Fixed (slightly differently) in current -BK. Don't see it yet. Something else: ext2_panic is unused, it seems. Andries diff -uprN -X /linux/dontdiff a/fs/ext2/ext2.h b/fs/ext2/ext2.h --- a/fs/ext2/ext2.h 2003-12-18 03:59:56.000000000 +0100 +++ b/fs/ext2/ext2.h 2004-08-28 03:19:30.000000000 +0200 @@ -131,9 +131,6 @@ extern int ext2_ioctl (struct inode *, s /* super.c */ extern void ext2_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); -extern NORET_TYPE void ext2_panic (struct super_block *, const char *, - const char *, ...) - __attribute__ ((NORET_AND format (printf, 3, 4))); extern void ext2_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); extern void ext2_update_dynamic_rev (struct super_block *sb); diff -uprN -X /linux/dontdiff a/fs/ext2/super.c b/fs/ext2/super.c --- a/fs/ext2/super.c 2004-05-28 20:53:22.000000000 +0200 +++ b/fs/ext2/super.c 2004-08-28 03:20:00.000000000 +0200 @@ -66,27 +66,6 @@ void ext2_error (struct super_block * sb } } -NORET_TYPE void ext2_panic (struct super_block * sb, const char * function, - const char * fmt, ...) -{ - va_list args; - struct ext2_sb_info *sbi = EXT2_SB(sb); - - if (!(sb->s_flags & MS_RDONLY)) { - sbi->s_mount_state |= EXT2_ERROR_FS; - sbi->s_es->s_state = - cpu_to_le16(le16_to_cpu(sbi->s_es->s_state) | EXT2_ERROR_FS); - mark_buffer_dirty(sbi->s_sbh); - sb->s_dirt = 1; - } - va_start (args, fmt); - vsprintf (error_buf, fmt, args); - va_end (args); - sb->s_flags |= MS_RDONLY; - panic ("EXT2-fs panic (device %s): %s: %s\n", - sb->s_id, function, error_buf); -} - void ext2_warning (struct super_block * sb, const char * function, const char * fmt, ...) { ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] remove unused ext2_panic 2004-08-28 1:19 ` [PATCH] remove unused ext2_panic Andries Brouwer @ 2004-08-28 1:58 ` Linus Torvalds 2004-08-28 21:30 ` [PATCH] ext2 mount options doc Andries Brouwer 0 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2004-08-28 1:58 UTC (permalink / raw) To: Andries Brouwer; +Cc: akpm, linux-kernel On Sat, 28 Aug 2004, Andries Brouwer wrote: > > Don't see it yet. It's in the "else" part of the if, so you may not have noticed. > Something else: ext2_panic is unused, it seems. Hmm, yes indeed. Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ext2 mount options doc 2004-08-28 1:58 ` Linus Torvalds @ 2004-08-28 21:30 ` Andries Brouwer 2004-08-28 21:46 ` Andrew Morton 0 siblings, 1 reply; 7+ messages in thread From: Andries Brouwer @ 2004-08-28 21:30 UTC (permalink / raw) To: Linus Torvalds; +Cc: Andries Brouwer, akpm, linux-kernel Updated mount.8, and in the process added a few words to Documentation/filesystems/ext2.txt too. Andries diff -uprN -X /linux/dontdiff a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt --- a/Documentation/filesystems/ext2.txt 2003-12-18 03:58:28.000000000 +0100 +++ b/Documentation/filesystems/ext2.txt 2004-08-28 23:17:15.000000000 +0200 @@ -12,29 +12,47 @@ Options ======= When mounting an ext2 filesystem, the following options are accepted. -Defaults are marked with (*). +Most defaults are determined by the filesystem superblock, and can be +set using tune2fs(8). Kernel-determined defaults are indicated by (*). bsddf (*) Makes `df' act like BSD. minixdf Makes `df' act like Minix. +check Check block and inode bitmaps at mount time + (requires CONFIG_EXT2_CHECK). check=none, nocheck (*) Don't do extra checking of bitmaps on mount (check=normal and check=strict options removed) debug Extra debugging information is sent to the kernel syslog. Useful for developers. -errors=continue (*) Keep going on a filesystem error. +errors=continue Keep going on a filesystem error. errors=remount-ro Remount the filesystem read-only on an error. errors=panic Panic and halt the machine if an error occurs. grpid, bsdgroups Give objects the same group ID as their parent. -nogrpid, sysvgroups (*) New objects have the group ID of their creator. +nogrpid, sysvgroups New objects have the group ID of their creator. resuid=n The user ID which may use the reserved blocks. resgid=n The group ID which may use the reserved blocks. sb=n Use alternate superblock at this location. +nouid32 Use 16-bit UIDs and GIDs. + +oldalloc Use old allocator for new inodes. +orlov (*) Use Orlov allocator. + +nobh Do not attach buffer_heads to file pagecache. + +user_xattr Support "user." extended attributes + (requires CONFIG_EXT2_FS_XATTR). +nouser_xattr Don't support "user." extended attributes. + +acl Support POSIX Access Control Lists + (requires CONFIG_EXT2_FS_POSIX_ACL). +noacl Don't support POSIX ACLs. + grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ext2 mount options doc 2004-08-28 21:30 ` [PATCH] ext2 mount options doc Andries Brouwer @ 2004-08-28 21:46 ` Andrew Morton 2004-08-28 22:08 ` Andries Brouwer 0 siblings, 1 reply; 7+ messages in thread From: Andrew Morton @ 2004-08-28 21:46 UTC (permalink / raw) To: Andries Brouwer; +Cc: torvalds, linux-kernel Andries Brouwer <Andries.Brouwer@cwi.nl> wrote: > > Updated mount.8, and in the process added a few words to > Documentation/filesystems/ext2.txt too. Linus's ext2.txt has recently been updated, so your patch generates 100% rejects. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ext2 mount options doc 2004-08-28 21:46 ` Andrew Morton @ 2004-08-28 22:08 ` Andries Brouwer 0 siblings, 0 replies; 7+ messages in thread From: Andries Brouwer @ 2004-08-28 22:08 UTC (permalink / raw) To: Andrew Morton; +Cc: Andries Brouwer, torvalds, linux-kernel On Sat, Aug 28, 2004 at 02:46:30PM -0700, Andrew Morton wrote: > Andries Brouwer <Andries.Brouwer@cwi.nl> wrote: > > Updated mount.8, and in the process added a few words to > > Documentation/filesystems/ext2.txt too. > > Linus's ext2.txt has recently been updated, so your patch generates 100% > rejects. Good - no doubt that means that my update is superfluous already. Let me see.. Hmm. This new file documents barrier=1 and I did not. Does that really apply to ext2? Otherwise the changes agree, except that I documented that since 2.5.46 most defaults are not determined by the kernel but by the superblock. (So some *'s should be deleted.) (Will not send a new patch now. Maybe later.) Andries ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-28 22:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-08-27 16:06 [PATCH] reiserfs/xattr fix Andries.Brouwer 2004-08-27 18:04 ` Linus Torvalds 2004-08-28 1:19 ` [PATCH] remove unused ext2_panic Andries Brouwer 2004-08-28 1:58 ` Linus Torvalds 2004-08-28 21:30 ` [PATCH] ext2 mount options doc Andries Brouwer 2004-08-28 21:46 ` Andrew Morton 2004-08-28 22:08 ` Andries Brouwer
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.