mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: ext3 extended attributes refcounting wrong?
@ 2005-02-05 12:39 Mikael Pettersson
  2005-02-05 14:20 ` Andreas Gruenbacher
  0 siblings, 1 reply; 12+ messages in thread
From: Mikael Pettersson @ 2005-02-05 12:39 UTC (permalink / raw)
  To: agruen; +Cc: adilger, akpm, linux-kernel, sct

On Fri, 04 Feb 2005 17:19:09 +0100, Andreas Gruenbacher wrote:
>On Fri, 2005-02-04 at 15:15, Mikael Pettersson wrote:
>
>> Plain www.kernel.org kernels always.
>
>Good, it's no bug then. Stephen already explained what's going on: when
>a file has xattrs and you delete the file while running a kernel without
>xattr support, the xattr block's refcount is not decremented. You end up
>with a reference count that is one too high. This won't result in
>filesystem corruption, but e2fsck will fix up the refcounts for you.
>Those are the mesages you were getting.

It explains why ext3 file systems acquire inconsistencies when
people dual-boot 2.6 and 2.4. It does not explain why 2.6 allocated
the xattr blocks in the first place; as I wrote initially, I
have disabled the xattrs stuff:

CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set

/Mikael

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: ext3 extended attributes refcounting wrong?
@ 2005-02-05 19:49 Mikael Pettersson
  2005-02-07  9:23 ` Stephen C. Tweedie
  0 siblings, 1 reply; 12+ messages in thread
From: Mikael Pettersson @ 2005-02-05 19:49 UTC (permalink / raw)
  To: agruen; +Cc: adilger, akpm, linux-kernel, sct

On Sat, 05 Feb 2005 15:20:00 +0100, Andreas Gruenbacher wrote:
>On Sat, 2005-02-05 at 13:39, Mikael Pettersson wrote:
>> [...] It does not explain why 2.6 allocated
>> the xattr blocks in the first place; as I wrote initially, I
>> have disabled the xattrs stuff:
>> 
>> CONFIG_EXT3_FS=y
>> # CONFIG_EXT3_FS_XATTR is not set
>
>The filesystem in question must have been used with a kernel that was
>xattr aware once. You could also have been using ext2. Maybe you ran
>selinux at some point, or similar. Can you boot into a kernel with
>CONFIG_EXT3_FS_XATTR enabled, and ``getfattr -m- -d -R .'' on the
>filesystem in question? This gives you a full xattr dump.

Done. According to that command, there are no xattrs anywhere
on any of the affected file systems. So it seems my self-compiled
xattr-disabled 2.6 kernels aren't to blame.

That leaves either the FC2 or FC3 installer kernels: one of
them must have created the xattrs. I don't know why/when they
were leaked, but this is consistent with the fact that I've
only seen fsck complain about the xattr blocks once on any
given file system.

Sorry about the false alarm.

/Mikael

^ permalink raw reply	[flat|nested] 12+ messages in thread
* ext3 extended attributes refcounting wrong?
@ 2005-02-03 22:42 Mikael Pettersson
  2005-02-03 23:36 ` Stephen C. Tweedie
  0 siblings, 1 reply; 12+ messages in thread
From: Mikael Pettersson @ 2005-02-03 22:42 UTC (permalink / raw)
  To: sct, akpm, adilger; +Cc: linux-kernel

I believe there is some accounting error in the ext3 code
for the case when CONFIG_EXT3_FS_XATTR is not selected.

Whenever any one of my development boxes triggers an fsck
at boot because some file system, usually /, has been mounted
sufficiently many times, an inconsistency error occurs:

Extended attribute block N has reference count M, should be M'.

where M' is much less than M. As I drop into single-user and
run fsck, it finds at lot occurrences of this error, followed by:

Block bitmap differences ...

and then:

Free blocks count wrong

(always too low, i.e. I have more free blocks than the fs records).

This occurs on all my boxes, with different CPUs (x86/x86-64/ppc)
and different chipsets (Intel, Promise, VIA, Apple), and basically
the only commonalities are:
- they dual boot the most recent 2.4 and 2.6 kernels, and I switch often
- all file systems are ext3
- all XATTR stuff is disabled

/Mikael

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-02-07  9:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-05 12:39 ext3 extended attributes refcounting wrong? Mikael Pettersson
2005-02-05 14:20 ` Andreas Gruenbacher
  -- strict thread matches above, loose matches on Subject: below --
2005-02-05 19:49 Mikael Pettersson
2005-02-07  9:23 ` Stephen C. Tweedie
2005-02-03 22:42 Mikael Pettersson
2005-02-03 23:36 ` Stephen C. Tweedie
2005-02-04  8:25   ` Mikael Pettersson
2005-02-04 10:40     ` Stephen C. Tweedie
2005-02-04 13:10       ` Mikael Pettersson
2005-02-04 13:56         ` Stephen C. Tweedie
2005-02-04 14:15           ` Mikael Pettersson
2005-02-04 16:19             ` Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome