1. 12 4月, 2015 3 次提交
  2. 26 3月, 2015 1 次提交
  3. 07 5月, 2014 5 次提交
  4. 11 3月, 2014 1 次提交
    • S
      hfsplus: add HFSX subfolder count support · d7d673a5
      Sergei Antonov 提交于
      Adds support for HFSX 'HasFolderCount' flag and a corresponding
      'folderCount' field in folder records.  (For reference see
      HFS_FOLDERCOUNT and kHFSHasFolderCountBit/kHFSHasFolderCountMask in
      Apple's source code.)
      
      Ignoring subfolder count leads to fs errors found by Mac:
      
        ...
        Checking catalog hierarchy.
        HasFolderCount flag needs to be set (id = 105)
        (It should be 0x10 instead of 0)
        Incorrect folder count in a directory (id = 2)
        (It should be 7 instead of 6)
        ...
      
      Steps to reproduce:
       Format with "newfs_hfs -s /dev/diskXXX".
       Mount in Linux.
       Create a new directory in root.
       Unmount.
       Run "fsck_hfs /dev/diskXXX".
      
      The patch handles directory creation, deletion, and rename.
      Signed-off-by: NSergei Antonov <saproj@gmail.com>
      Reviewed-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7d673a5
  5. 01 2月, 2014 1 次提交
  6. 26 1月, 2014 1 次提交
  7. 24 1月, 2014 1 次提交
    • S
      hfsplus: remove hfsplus_file_lookup() · d74a054f
      Sougata Santra 提交于
      HFS+ resource fork lookup breaks opendir() library function.  Since
      opendir first calls open() with O_DIRECTORY flag set.  O_DIRECTORY means
      "refuse to open if not a directory".  The open system call in the kernel
      does a check for inode->i_op->lookup and returns -ENOTDIR.  So if
      hfsplus_file_lookup is set it allows opendir() for plain files.
      
      Also resource fork lookup in HFS+ does not work.  Since it is never
      invoked after VFS permission checking.  It will always return with
      -EACCES.
      
      When we call opendir() on a file, it does not return NULL.  opendir()
      library call is based on open with O_DIRECTORY flag passed and then
      layered on top of getdents() system call.  O_DIRECTORY means "refuse to
      open if not a directory".
      
      The open() system call in the kernel does a check for: do_sys_open()
      -->..--> can_lookup() i.e it only checks inode->i_op->lookup and returns
      ENOTDIR if this function pointer is not set.
      
      In OSX, we can open "file/rsrc" to get the resource fork of "file".  This
      behavior is emulated inside hfsplus on Linux, which means that to some
      degree every file acts like a directory.  That is the reason lookup()
      inode operations is supported for files, and it is possible to do a lookup
      on this specific name.  As a result of this open succeeds without
      returning ENOTDIR for HFS+
      
      Please see the LKML discussion thread on this issue:
      http://marc.info/?l=linux-fsdevel&m=122823343730412&w=2
      
      I tried to test file/rsrc lookup in HFS+ driver and the feature does not
      work.  From OSX:
      
      $ touch test
      $ echo "1234" > test/..namedfork/rsrc
      $ ls -l test..namedfork/rsrc
      --rw-r--r-- 1 tuxera staff 5 10 dec 12:59 test/..namedfork/rsrc
      
      [sougata@ultrabook tmp]$ id
      uid=1000(sougata) gid=1000(sougata) groups=1000(sougata),5(tty),18(dialout),1001(vboxusers)
      
      [sougata@ultrabook tmp]$ mount
      /dev/sdb1 on /mnt/tmp type hfsplus (rw,relatime,umask=0,uid=1000,gid=1000,nls=utf8)
      
      [sougata@ultrabook tmp]$ ls -l test/rsrc
      ls: cannot access test/rsrc: Permission denied
      
      According to this LKML thread it is expected behavior.
      
      http://marc.info/?t=121139033800008&r=1&w=4
      
      I guess now that permission checking happens in vfs generic_permission() ?
       So it turns out that even though the lookup() inode_operation exists for
      HFS+ files.  It cannot really get invoked ?.  So if we can disable this
      feature to make opendir() work for HFS+.
      Signed-off-by: NSougata Santra <sougata@tuxera.com>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Anton Altaparmakov <aia21@cam.ac.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d74a054f
  8. 13 9月, 2013 1 次提交
  9. 12 9月, 2013 1 次提交
  10. 08 5月, 2013 1 次提交
  11. 01 5月, 2013 1 次提交
  12. 28 2月, 2013 1 次提交
  13. 23 2月, 2013 1 次提交
  14. 21 12月, 2012 1 次提交
  15. 21 9月, 2012 1 次提交
  16. 23 7月, 2012 1 次提交
    • A
      hfsplus: get rid of write_super · 9e6c5829
      Artem Bityutskiy 提交于
      This patch makes hfsplus stop using the VFS '->write_super()' method along with
      the 's_dirt' superblock flag, because they are on their way out.
      
      The whole "superblock write-out" VFS infrastructure is served by the
      'sync_supers()' kernel thread, which wakes up every 5 (by default) seconds and
      writes out all dirty superblocks using the '->write_super()' call-back.  But the
      problem with this thread is that it wastes power by waking up the system every
      5 seconds, even if there are no diry superblocks, or there are no client
      file-systems which would need this (e.g., btrfs does not use
      '->write_super()'). So we want to kill it completely and thus, we need to make
      file-systems to stop using the '->write_super()' VFS service, and then remove
      it together with the kernel thread.
      
      Tested using fsstress from the LTP project.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      9e6c5829
  17. 14 7月, 2012 1 次提交
    • A
      stop passing nameidata to ->lookup() · 00cd8dd3
      Al Viro 提交于
      Just the flags; only NFS cares even about that, but there are
      legitimate uses for such argument.  And getting rid of that
      completely would require splitting ->lookup() into a couple
      of methods (at least), so let's leave that alone for now...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      00cd8dd3
  18. 21 3月, 2012 1 次提交
  19. 04 1月, 2012 1 次提交
  20. 02 11月, 2011 1 次提交
  21. 21 7月, 2011 3 次提交
  22. 07 7月, 2011 1 次提交
  23. 10 3月, 2011 1 次提交
  24. 17 12月, 2010 2 次提交
  25. 23 11月, 2010 5 次提交
  26. 26 10月, 2010 1 次提交
  27. 14 10月, 2010 1 次提交
    • C
      hfsplus: create correct initial catalog entries for device files · 90e61690
      Christoph Hellwig 提交于
      Make sure the initial insertation of the catalog entry already contains
      the device number by calling init_special_inode early and setting writing
      out the dev field of the on-disk permission structure.  The latter is
      facilitated by sharing the almost identical hfsplus_set_perms helpers
      between initial catalog entry creating and ->write_inode.
      
      Unless we crashed just after mknod this bug was harmless as the inode
      is marked dirty at the end of hfsplus_mknod, and hfsplus_write_inode
      will update the catalog entry to contain the correct value.
      Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
      90e61690