1. 01 8月, 2009 1 次提交
    • O
      fat/nls: Fix handling of utf8 invalid char · 67638e40
      OGAWA Hirofumi 提交于
      With utf8 option, vfat allowed the duplicated filenames.
      
      Normal nls returns -EINVAL for invalid char. But utf8s_to_utf16s()
      skipped the invalid char historically.
      
      So, this changes the utf8s_to_utf16s() directly to return -EINVAL for
      invalid char, because vfat is only user of it.
      
      mkdir /mnt/fatfs
      FILENAME=`echo -ne "invalidutf8char_\\0341_endofchar"`
      echo "Using filename: $FILENAME"
      dd if=/dev/zero of=fatfs bs=512 count=128
      mkdosfs -F 32 fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      umount /mnt/fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      ls -l /mnt/fatfs
      umount /mnt/fatfs
      
      ----  And the output is:
      
      Using filename: invalidutf8char_\0341_endofchar
      128+0 records in
      128+0 records out
      65536 bytes (66 kB) copied, 0.000388118 s, 169 MB/s
      mkdosfs 2.11 (12 Mar 2005)
      total 0
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      Tested-by: NMarton Balint <cus@fazekas.hu>
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      67638e40
  2. 13 7月, 2009 1 次提交
  3. 16 6月, 2009 1 次提交
    • A
      NLS: update handling of Unicode · 74675a58
      Alan Stern 提交于
      This patch (as1239) updates the kernel's treatment of Unicode.  The
      character-set conversion routines are well behind the current state of
      the Unicode specification: They don't recognize the existence of code
      points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.
      
      The old wchar_t 16-bit type is retained because it's still used in
      lots of places.  This shouldn't cause any new problems; if a
      conversion now results in an invalid 16-bit code then before it must
      have yielded an undefined code.
      
      Difficult-to-read names like "utf_mbstowcs" are replaced with more
      transparent names like "utf8s_to_utf16s" and the ordering of the
      parameters is rationalized (buffer lengths come immediate after the
      pointers they refer to, and the inputs precede the outputs).
      Fortunately the low-level conversion routines are used in only a few
      places; the interfaces to the higher-level uni2char and char2uni
      methods have been left unchanged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74675a58
  4. 12 6月, 2009 1 次提交
  5. 04 6月, 2009 1 次提交
  6. 28 3月, 2009 1 次提交
  7. 12 11月, 2008 1 次提交
  8. 07 11月, 2008 6 次提交
  9. 26 7月, 2008 1 次提交
    • J
      fatfs: add UTC timestamp option · b271e067
      Joe Peterson 提交于
      Provide a new mount option ("tz=UTC") for DOS (vfat/msdos) filesystems,
      allowing timestamps to be in coordinated universal time (UTC) rather than
      local time in applications where doing this is advantageous.
      
      In particular, portable devices that use fat/vfat (such as digital
      cameras) can benefit from using UTC in their internal clocks, thus
      avoiding daylight saving time errors and general time ambiguity issues.
      The user of the device does not have to worry about changing the time when
      moving from place or when daylight saving changes.
      
      The new mount option, when set, disables the counter-adjustment that Linux
      currently makes to FAT timestamp info in anticipation of the normal
      userspace time zone correction.  When used in this new mode, all daylight
      saving time and time zone handling is done in userspace as is normal for
      many other filesystems (like ext3).  The default mode, which remains
      unchanged, is still appropriate when mounting volumes written in Windows
      (because of its use of local time).
      
      I originally based this patch on one submitted last year by Paul Collins,
      but I updated it to work with current source and changed variable/option
      naming.  Ogawa Hirofumi (who maintains these filesystems) and I discussed
      this patch at length on lkml, and he suggested using the option name in
      the attached version of the patch.  Barry Bouwsma pointed out a good
      addition to the patch as well.
      Signed-off-by: NJoe Peterson <joe@skyrush.com>
      Signed-off-by: NPaul Collins <paul@ondioline.org>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Barry Bouwsma <free_beer_for_all@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b271e067
  10. 21 6月, 2008 1 次提交
    • L
      Replace BKL with superblock lock in fat/msdos/vfat · 8f593427
      Linus Torvalds 提交于
      This replaces the use of the BKL in the FAT family of filesystems with the
      existing superblock lock instead.
      
      The code already appears to do mostly proper locking with its own private
      spinlocks (and mutexes), but while the BKL could possibly have been
      dropped entirely, converting it to use the superblock lock (which is just
      a regular mutex) is the conservative thing to do.
      
      As a per-filesystem mutex, it not only won't have any of the possible
      latency issues related to the BKL, but the lock is obviously private to
      the particular filesystem instance and will thus not cause problems for
      entirely unrelated users like the BKL can.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      8f593427
  11. 30 4月, 2008 1 次提交
  12. 28 4月, 2008 3 次提交
  13. 08 2月, 2008 1 次提交
  14. 13 2月, 2007 1 次提交
  15. 17 11月, 2006 1 次提交
  16. 01 10月, 2006 3 次提交
  17. 23 6月, 2006 1 次提交
    • D
      [PATCH] VFS: Permit filesystem to override root dentry on mount · 454e2398
      David Howells 提交于
      Extend the get_sb() filesystem operation to take an extra argument that
      permits the VFS to pass in the target vfsmount that defines the mountpoint.
      
      The filesystem is then required to manually set the superblock and root dentry
      pointers.  For most filesystems, this should be done with simple_set_mnt()
      which will set the superblock pointer and then set the root dentry to the
      superblock's s_root (as per the old default behaviour).
      
      The get_sb() op now returns an integer as there's now no need to return the
      superblock pointer.
      
      This patch permits a superblock to be implicitly shared amongst several mount
      points, such as can be done with NFS to avoid potential inode aliasing.  In
      such a case, simple_set_mnt() would not be called, and instead the mnt_root
      and mnt_sb would be set directly.
      
      The patch also makes the following changes:
      
       (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
           pointer argument and return an integer, so most filesystems have to change
           very little.
      
       (*) If one of the convenience function is not used, then get_sb() should
           normally call simple_set_mnt() to instantiate the vfsmount. This will
           always return 0, and so can be tail-called from get_sb().
      
       (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
           dcache upon superblock destruction rather than shrink_dcache_anon().
      
           This is required because the superblock may now have multiple trees that
           aren't actually bound to s_root, but that still need to be cleaned up. The
           currently called functions assume that the whole tree is rooted at s_root,
           and that anonymous dentries are not the roots of trees which results in
           dentries being left unculled.
      
           However, with the way NFS superblock sharing are currently set to be
           implemented, these assumptions are violated: the root of the filesystem is
           simply a dummy dentry and inode (the real inode for '/' may well be
           inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
           with child trees.
      
           [*] Anonymous until discovered from another tree.
      
       (*) The documentation has been adjusted, including the additional bit of
           changing ext2_* into foo_* in the documentation.
      
      [akpm@osdl.org: convert ipath_fs, do other stuff]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      454e2398
  18. 01 4月, 2006 1 次提交
  19. 31 10月, 2005 2 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4