2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 07:34:06 +08:00
linux-next/fs/hfsplus
Vyacheslav Dubeyko 899bed05e9 hfsplus: fix issue with unzeroed unused b-tree nodes
The fsck_hfs (under MacOS X) complains about unzeroed unused b-tree nodes
after deletion of folders' tree under Linux.

SYMPTOMS:

  Running Disk Utiltiy's "Verify Disk" on "test" gives the following:
  Verifying volume “Test”
  Checking file systemChecking Journaled HFS Plus volume.
  Checking extents overflow file.
  Checking catalog file.
  Unused node is not erased (node = 3111)
  Checking multi-linked files.
  Checking catalog hierarchy.
  Checking extended attributes file.
  Checking volume bitmap.
  Checking volume information.
  The volume Test was found corrupt and needs to be repaired.
  Error: This disk needs to be repaired. Click Repair Disk.

REPRODUCING PATH:

1. Prepare HFS+ (non-case sensitive) partition (for example, 5GB)
   under MacOS X.
2. Copy linux kernel source tree (for example, 3.7-rc6 version) on
   this partition under MacOS X.
3. Then switch to Linux and mount this prepared partition.
4. Execute `sudo rm -r` under prepared directory with linux kernel
   source tree.
5. Unmount and boot back into OS X.
6. Open up Disk Utility and verify partition.

REPRODUCIBILITY: 100%

FIX:

It is added code of node clearing in hfs_bnode_put() method for the case
when node has flag HFS_BNODE_DELETED.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Kyle Laracey <kalaracey@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:10 -08:00
..
attributes.c hfsplus: add functionality of manipulating by records in attributes tree 2013-02-27 19:10:10 -08:00
bfind.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
bitmap.c hfsplus: avoid crash on failed block map free 2012-12-20 17:40:19 -08:00
bnode.c hfsplus: fix issue with unzeroed unused b-tree nodes 2013-02-27 19:10:10 -08:00
brec.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
btree.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
catalog.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
dir.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
extents.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
hfsplus_fs.h hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
hfsplus_raw.h hfsplus: add on-disk layout declarations related to attributes tree 2013-02-27 19:10:10 -08:00
inode.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
ioctl.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
Kconfig fs/Kconfig: move hfs, hfsplus out 2009-01-22 13:15:57 +03:00
Makefile hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
options.c userns: Convert hfsplus to use kuid and kgid where appropriate 2012-09-21 03:13:12 -07:00
part_tbl.c hfsplus: ensure bio requests are not smaller than the hardware sectors 2011-07-22 16:37:44 +02:00
super.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
tables.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unicode.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
wrapper.c hfsplus: fix overflow in sector calculations in hfsplus_submit_bio 2012-06-17 14:39:45 -07:00
xattr_security.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr_trusted.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr_user.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr.h hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00