Re: [PATCH] dumpe2fs: Warn when filesystem is mounted read-write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 28-07-11 10:44:30, Andreas Dilger wrote:
> On 2011-07-28, at 9:17 AM, Jan Kara <jack@xxxxxxx> wrote:
> > When dumpe2fs is used on a filesystem mounted read-write, printed information
> > may be old and inconsistent because e.g. updates of some superblock fields
> > happen lazily or because we do not really try to handle various intermediate
> > states of filesystem operations. Document this in the manpage and warn user
> > when dumpe2fs is used for such filesystem.
> 
> Jan, does this specifically relate to the free blocks or free inodes
> count?  My preference would actually be to have dumpe2fs print the
> correct values. I guess that means reading all of the group descriptors
> and adding up the free block/inode counts like the kernel does. 
  Yes, the number of free blocks and inodes are the main offenders,
although there are other fields like s_wtime, or s_kbytes_written that are
updated only during umount.

> I'm not against this patch in principle, since any operation on a mounted
> filesystem is inherently racy, but as it stands now the information
> printed by dumpe2fs can be completely useless. 
  Well, but OTOH in some cases it might be desirable to actually see the
real numbers stored and since dumpe2fs is mainly for debugging purposes I'd
rather have it's output as close to what's on disk as possible. If people
are interested in amount of free blocks / inodes, they should use statfs(2)
after all.  So I'd be reluctant to add some computations like you
suggest... What dumpe2fs might do is sync the filesystem (and do statfs())
to force most of the information to disk when it sees the filesystem is
mounted. I can update my patch to do this when people think it's desirable.
  
									Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux