what fsck does to the hfs+ journal

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

 



Hi,

I have somewhat looked at what fsck does to unclean journals, and the outcome is
surprising.

I have another darwin virtual machine which I killed for some other reason while doing some heavy
writing.

- xnu replays an unclean journal with "replay_journal: from x to y (joffset 0xZZZZZZZ)"

- running fsck on its disk image, always results in xnu outputing "journal start/end pointer reset".
This behavior is cleared only after the first rw mount. You can keep seeing the same message
if you keep booting single user mode (i.e. read-only mount).

On first read-write mount, I get "Remove x orphaned /unlinked files and y directories", under
either case.

There is a JOURNAL_RESET flag in the xnu code, which results in the pointer reset message,
but diskdev_cmds does not even have this define.
(it does have JOURNAL_NO_GROUP_COMMIT, however), so I don't know how it was set (yet).

xnu/bsd/vfs/vfs_journal.h-293-/*
xnu/bsd/vfs/vfs_journal.h-294- * flags for journal_create/open.  only can use 
xnu/bsd/vfs/vfs_journal.h-295- * the low 16 bits for flags because internal 
xnu/bsd/vfs/vfs_journal.h-296- * bits go in the high 16.
xnu/bsd/vfs/vfs_journal.h-297- */
xnu/bsd/vfs/vfs_journal.h-298-#define JOURNAL_NO_GROUP_COMMIT   0x00000001
xnu/bsd/vfs/vfs_journal.h:299:#define JOURNAL_RESET             0x00000002

journal replay results in a bigger amount of file system change, than just fsck + mount rw.
(in fact in the latter case, it seems there is a lot of fs changes on the first rw mount after).

Do we remove orphaned/unlinked files directories on read-write mount of hfs+ in the linux kernel?

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