hfsplus foldercount (Re: hfsplus BUG(), kmap and journalling.)

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

 



--- On Tue, 30/10/12, Vyacheslav Dubeyko <slava@xxxxxxxxxxx> wrote:

<snipped>
> [snip]
> > BTW, I think I see another bug - unrelated to
> journalling - in the current hfs+ 
> > code: folder counts are not updated correctly. It seems
> that hfs+ folders have 
> > recursive folder counts (i.e. a parent dir knows how
> many sub-dir's it has, 
> > without needing to recurse down), and this is currently
> not updated correctly. 
> > One way of demo'ing this is to:
> > 
> >     (make sure fs is fsck-clean ;
> mount)
> > 
> >     cp -ipr
> somedir_with_some_files/ some_hfs+_place/someplace_inside/
> > 
> >     (umount; run fsck_hfs again,
> now it complains about folder counts)
> > 
> > The actual message looks a it like this:
> > 
> > ** Checking catalog hierarchy.
> >     HasFolderCount flag needs to be
> set (id = 393055)
> >     (It should be 0x10 instead of
> 0)
> >     Incorrect folder count in a
> directory (id = 205)
> >     (It should be 18 instead of
> 17)
> 
> Sorry, I can't reproduce this issue. I tried to reproduce as
> you
> described. Maybe, do you miss something?

Since it is easily producible for me, I thought I'd have a look one day... got side-tracked to look at Apple's xnu kernel's file system driver on journal, and turned out to be interesting. Just grep -R -i foldercount shows, among other things, a very important comment:

bsd/hfs/hfs_vfsutils.c:	/* kHFSHasFolderCount is only supported/updated on HFSX volumes */

So the foldercount feature is "optional" and only switched on for the casesitive variant of HFS+ . Yes, while my primary interests is in journalling, for inter-operation with linux, I somewhat naively always chose to format my test volumes as HFSX, rather than the the plain case-preserving-but-not-sensitive variant, not knowing there are important differences.

I'll find some time to have a look at what else is hiding in Apple's xnu kernel code... there are probably more interesting "optional" but important differences.

Hin-Tak
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux