14 Dec, 2014

1 commit

  • When running FSX with direct I/O mode, fsx resulted in DATA past EOF issues.

    fsx ./file2 -Z -r 4096 -w 4096
    ...
    ..
    truncating to largest ever: 0x907c
    fallocating to largest ever: 0x11137
    truncating to largest ever: 0x2c6fe
    truncating to largest ever: 0x2cfdf
    fallocating to largest ever: 0x40000
    Mapped Read: non-zero data past EOF (0x18628) page offset 0x629 is 0x2a4e
    ...
    ..

    The reason being, it is doing a truncate down, but the zeroing does not
    happen on the last block boundary when offset is not aligned. Even though
    it calls truncate_setsize()->truncate_inode_pages()->
    truncate_inode_pages_range() and considers the partial zeroout but it
    retrieves the page using find_lock_page() - which only looks the page in
    the cache. So, zeroing out does not happen in case of direct IO.

    Make a truncate page based around block_truncate_page for FAT filesystem
    and invoke that helper to zerout in case the offset is not aligned with
    the blocksize.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     

11 Dec, 2014

1 commit

  • Pull VFS changes from Al Viro:
    "First pile out of several (there _definitely_ will be more). Stuff in
    this one:

    - unification of d_splice_alias()/d_materialize_unique()

    - iov_iter rewrite

    - killing a bunch of ->f_path.dentry users (and f_dentry macro).

    Getting that completed will make life much simpler for
    unionmount/overlayfs, since then we'll be able to limit the places
    sensitive to file _dentry_ to reasonably few. Which allows to have
    file_inode(file) pointing to inode in a covered layer, with dentry
    pointing to (negative) dentry in union one.

    Still not complete, but much closer now.

    - crapectomy in lustre (dead code removal, mostly)

    - "let's make seq_printf return nothing" preparations

    - assorted cleanups and fixes

    There _definitely_ will be more piles"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
    copy_from_iter_nocache()
    new helper: iov_iter_kvec()
    csum_and_copy_..._iter()
    iov_iter.c: handle ITER_KVEC directly
    iov_iter.c: convert copy_to_iter() to iterate_and_advance
    iov_iter.c: convert copy_from_iter() to iterate_and_advance
    iov_iter.c: get rid of bvec_copy_page_{to,from}_iter()
    iov_iter.c: convert iov_iter_zero() to iterate_and_advance
    iov_iter.c: convert iov_iter_get_pages_alloc() to iterate_all_kinds
    iov_iter.c: convert iov_iter_get_pages() to iterate_all_kinds
    iov_iter.c: convert iov_iter_npages() to iterate_all_kinds
    iov_iter.c: iterate_and_advance
    iov_iter.c: macros for iterating over iov_iter
    kill f_dentry macro
    dcache: fix kmemcheck warning in switch_names
    new helper: audit_file()
    nfsd_vfs_write(): use file_inode()
    ncpfs: use file_inode()
    kill f_dentry uses
    lockd: get rid of ->f_path.dentry->d_sb
    ...

    Linus Torvalds
     

04 Dec, 2014

1 commit

  • a) don't bother with ->d_time for positives - we only check it for
    negatives anyway.

    b) make sure to set it at unlink and rmdir time - at *that* point
    soon-to-be negative dentry matches then-current directory contents

    c) don't go into renaming of old alias in vfat_lookup() unless it
    has the same parent (which it will, unless we are seeing corrupted
    image)

    [hirofumi@mail.parknet.co.jp: make change minimum, don't call d_move() for dir]
    Signed-off-by: Al Viro
    Signed-off-by: OGAWA Hirofumi
    Cc: [3.17.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

01 Nov, 2014

1 commit


14 Oct, 2014

1 commit


13 Jun, 2014

1 commit

  • Pull vfs updates from Al Viro:
    "This the bunch that sat in -next + lock_parent() fix. This is the
    minimal set; there's more pending stuff.

    In particular, I really hope to get acct.c fixes merged this cycle -
    we need that to deal sanely with delayed-mntput stuff. In the next
    pile, hopefully - that series is fairly short and localized
    (kernel/acct.c, fs/super.c and fs/namespace.c). In this pile: more
    iov_iter work. Most of prereqs for ->splice_write with sane locking
    order are there and Kent's dio rewrite would also fit nicely on top of
    this pile"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (70 commits)
    lock_parent: don't step on stale ->d_parent of all-but-freed one
    kill generic_file_splice_write()
    ceph: switch to iter_file_splice_write()
    shmem: switch to iter_file_splice_write()
    nfs: switch to iter_splice_write_file()
    fs/splice.c: remove unneeded exports
    ocfs2: switch to iter_file_splice_write()
    ->splice_write() via ->write_iter()
    bio_vec-backed iov_iter
    optimize copy_page_{to,from}_iter()
    bury generic_file_aio_{read,write}
    lustre: get rid of messing with iovecs
    ceph: switch to ->write_iter()
    ceph_sync_direct_write: stop poking into iov_iter guts
    ceph_sync_read: stop poking into iov_iter guts
    new helper: copy_page_from_iter()
    fuse: switch to ->write_iter()
    btrfs: switch to ->write_iter()
    ocfs2: switch to ->write_iter()
    xfs: switch to ->write_iter()
    ...

    Linus Torvalds
     

07 Jun, 2014

2 commits

  • Initializations like 'char *foo = "bar"' will create two variables: a
    static string and a pointer (foo) to that static string. Instead 'char
    foo[] = "bar"' will declare a single variable and will end up in shorter
    assembly (according to Jeff Garzik on the KernelJanitor's TODO list).

    Signed-off-by: Manuel Schölling
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manuel Schölling
     
  • Add structure for parsed BPB information, struct fat_bios_param_block,
    and move all of the deserialization and validation logic from
    fat_fill_super() into fat_read_bpb().

    Add a 'dos1xfloppy' mount option to infer DOS 2.x BIOS Parameter Block
    defaults from block device geometry for ancient floppies and floppy
    images, as a fall-back from the default BPB parsing logic.

    When fat_read_bpb() finds an invalid FAT filesystem and dos1xfloppy is
    set, fall back to fat_read_static_bpb(). fat_read_static_bpb()
    validates that the entire BPB is zero, and that the floppy has a
    DOS-style 8086 code bootstrapping header. Then it fills in default BPB
    values from media size and a table.[0]

    Media size is assumed to be static for archaic FAT volumes. See also:
    [1].

    Fixes kernel.org bug #42617.

    [0]: https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
    [1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html

    [hirofumi@mail.parknet.co.jp: fix missed error code]
    Signed-off-by: Conrad Meyer
    Acked-by: OGAWA Hirofumi
    Signed-off-by: OGAWA Hirofumi
    Tested-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Conrad Meyer
     

07 May, 2014

5 commits


05 Apr, 2014

1 commit

  • Pull ext4 updates from Ted Ts'o:
    "Major changes for 3.14 include support for the newly added ZERO_RANGE
    and COLLAPSE_RANGE fallocate operations, and scalability improvements
    in the jbd2 layer and in xattr handling when the extended attributes
    spill over into an external block.

    Other than that, the usual clean ups and minor bug fixes"

    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (42 commits)
    ext4: fix premature freeing of partial clusters split across leaf blocks
    ext4: remove unneeded test of ret variable
    ext4: fix comment typo
    ext4: make ext4_block_zero_page_range static
    ext4: atomically set inode->i_flags in ext4_set_inode_flags()
    ext4: optimize Hurd tests when reading/writing inodes
    ext4: kill i_version support for Hurd-castrated file systems
    ext4: each filesystem creates and uses its own mb_cache
    fs/mbcache.c: doucple the locking of local from global data
    fs/mbcache.c: change block and index hash chain to hlist_bl_node
    ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate
    ext4: refactor ext4_fallocate code
    ext4: Update inode i_size after the preallocation
    ext4: fix partial cluster handling for bigalloc file systems
    ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
    ext4: only call sync_filesystm() when remounting read-only
    fs: push sync_filesystem() down to the file system's remount_fs()
    jbd2: improve error messages for inconsistent journal heads
    jbd2: minimize region locked by j_list_lock in jbd2_journal_forget()
    jbd2: minimize region locked by j_list_lock in journal_get_create_access()
    ...

    Linus Torvalds
     

04 Apr, 2014

1 commit

  • Reclaim will be leaving shadow entries in the page cache radix tree upon
    evicting the real page. As those pages are found from the LRU, an
    iput() can lead to the inode being freed concurrently. At this point,
    reclaim must no longer install shadow pages because the inode freeing
    code needs to ensure the page tree is really empty.

    Add an address_space flag, AS_EXITING, that the inode freeing code sets
    under the tree lock before doing the final truncate. Reclaim will check
    for this flag before installing shadow pages.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Rik van Riel
    Reviewed-by: Minchan Kim
    Cc: Andrea Arcangeli
    Cc: Bob Liu
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Greg Thelen
    Cc: Hugh Dickins
    Cc: Jan Kara
    Cc: KOSAKI Motohiro
    Cc: Luigi Semenzato
    Cc: Mel Gorman
    Cc: Metin Doslu
    Cc: Michel Lespinasse
    Cc: Ozgun Erdogan
    Cc: Peter Zijlstra
    Cc: Roman Gushchin
    Cc: Ryan Mallon
    Cc: Tejun Heo
    Cc: Vlastimil Babka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

13 Mar, 2014

1 commit

  • Previously, the no-op "mount -o mount /dev/xxx" operation when the
    file system is already mounted read-write causes an implied,
    unconditional syncfs(). This seems pretty stupid, and it's certainly
    documented or guaraunteed to do this, nor is it particularly useful,
    except in the case where the file system was mounted rw and is getting
    remounted read-only.

    However, it's possible that there might be some file systems that are
    actually depending on this behavior. In most file systems, it's
    probably fine to only call sync_filesystem() when transitioning from
    read-write to read-only, and there are some file systems where this is
    not needed at all (for example, for a pseudo-filesystem or something
    like romfs).

    Signed-off-by: "Theodore Ts'o"
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Christoph Hellwig
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: Evgeniy Dushistov
    Cc: Jan Kara
    Cc: OGAWA Hirofumi
    Cc: Anders Larsen
    Cc: Phillip Lougher
    Cc: Kees Cook
    Cc: Mikulas Patocka
    Cc: Petr Vandrovec
    Cc: xfs@oss.sgi.com
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: codalist@coda.cs.cmu.edu
    Cc: linux-ext4@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: fuse-devel@lists.sourceforge.net
    Cc: cluster-devel@redhat.com
    Cc: linux-mtd@lists.infradead.org
    Cc: jfs-discussion@lists.sourceforge.net
    Cc: linux-nfs@vger.kernel.org
    Cc: linux-nilfs@vger.kernel.org
    Cc: linux-ntfs-dev@lists.sourceforge.net
    Cc: ocfs2-devel@oss.oracle.com
    Cc: reiserfs-devel@vger.kernel.org

    Theodore Ts'o
     

25 Oct, 2013

1 commit


13 Sep, 2013

1 commit


10 Jul, 2013

1 commit

  • This patch, originally from Android kernel, adds vfat ioctl command
    FAT_IOCTL_GET_VOLUME_ID, with this command we can get the vfat volume ID
    using following code:

    ioctl(fd, FAT_IOCTL_GET_VOLUME_ID, &volume_ID)

    This patch is a modified version of the patch by Mike Lockwood, with
    changes from Dmitry Pervushin, who noticed the original patch makes some
    volume IDs abiguous with error returns: for example, if volume id is
    0xFFFFFDAD, that matches -ENOIOCTLCMD, we get "FFFFFFFF" from the user
    space.

    So add a parameter to ioctl to get the correct volume ID.

    Android uses vfat volume ID to identify different sd card, when a new sd
    card is inserted to device, android can scan the media on it and pop up
    new contents.

    Signed-off-by: Bintian Wang
    Cc: dmitry pervushin
    Cc: Mike Lockwood
    Cc: Colin Cross
    Acked-by: OGAWA Hirofumi
    Cc: John Stultz
    Cc: Sean McNeil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Lockwood
     

04 Jul, 2013

1 commit


29 Jun, 2013

2 commits

  • Instances either don't look at it at all (the majority of cases) or
    only want it to find the superblock (which can be had as dentry->d_sb).
    A few cases that want more are actually safe with dentry->d_inode -
    the only precaution needed is the check that it hadn't been replaced with
    NULL by rmdir() or by overwriting rename(), which case should be simply
    treated as cache miss.

    Signed-off-by: Linus Torvalds
    Signed-off-by: Al Viro

    Linus Torvalds
     
  • ... pox upon the idiotic ioctls; life would be much easier without
    those.

    Signed-off-by: Al Viro

    Al Viro
     

25 May, 2013

1 commit


08 May, 2013

1 commit

  • Faster kernel compiles by way of fewer unnecessary includes.

    [akpm@linux-foundation.org: fix fallout]
    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Kent Overstreet
    Cc: Zach Brown
    Cc: Felipe Balbi
    Cc: Greg Kroah-Hartman
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Rusty Russell
    Cc: Jens Axboe
    Cc: Asai Thambi S P
    Cc: Selvan Mani
    Cc: Sam Bradshaw
    Cc: Jeff Moyer
    Cc: Al Viro
    Cc: Benjamin LaHaise
    Reviewed-by: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     

30 Apr, 2013

6 commits

  • This patch enables rebuilding of directory inodes which are not present in
    the cache.This is done by traversing the disk clusters to find the
    directory entry of the parent directory and using its i_pos to build the
    inode.

    The traversal is done by fat_scan_logstart() which is similar to
    fat_scan() but matches i_pos values instead of names.fat_scan_logstart()
    needs an inode parameter to work, for which a dummy inode is created by
    it's caller fat_rebuild_parent(). This dummy inode is destroyed after the
    traversal completes.

    All this is done only if the nostale_ro nfs mount option is specified.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • If the cache lookups fail,use the i_pos value to find the directory entry
    of the inode and rebuild the inode.Since this involves accessing the FAT
    media, do this only if the nostale_ro nfs mount option is specified.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Define two nfs export_operation structures,one for 'stale_rw' mounts and
    the other for 'nostale_ro'. The latter uses i_pos as a basis for encoding
    and decoding file handles.

    Also, assign i_pos to kstat->ino. The logic for rebuilding the inode is
    added in the subsequent patches.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Introduce helper function to get the block number and offset for a given
    i_pos value. Use it in __fat_write_inode() now and later on in nfs.c

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Move fat_i_pos_read to fat.h so that it can be called from nfs.c in the
    subsequent patches to encode the file handle.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • This patchset eliminates the client side ESTALE errors when a FAT
    partition exported over NFS has its dentries evicted from the cache. The
    idea is to find the on-disk location_'i_pos' of the dirent of the inode
    that has been evicted and use it to rebuild the inode.

    This patch:

    Provide two possible values 'stale_rw' and 'nostale_ro' for the -o nfs
    mount option.The first one allows all file operations but does not reduce
    ESTALE errors on memory constrained systems. The second one eliminates
    ESTALE errors but mounts the filesystem as read-only. Not specifying a
    value defaults to 'stale_rw'.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     

04 Mar, 2013

1 commit

  • Modify the request_module to prefix the file system type with "fs-"
    and add aliases to all of the filesystems that can be built as modules
    to match.

    A common practice is to build all of the kernel code and leave code
    that is not commonly needed as modules, with the result that many
    users are exposed to any bug anywhere in the kernel.

    Looking for filesystems with a fs- prefix limits the pool of possible
    modules that can be loaded by mount to just filesystems trivially
    making things safer with no real cost.

    Using aliases means user space can control the policy of which
    filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
    with blacklist and alias directives. Allowing simple, safe,
    well understood work-arounds to known problematic software.

    This also addresses a rare but unfortunate problem where the filesystem
    name is not the same as it's module name and module auto-loading
    would not work. While writing this patch I saw a handful of such
    cases. The most significant being autofs that lives in the module
    autofs4.

    This is relevant to user namespaces because we can reach the request
    module in get_fs_type() without having any special permissions, and
    people get uncomfortable when a user specified string (in this case
    the filesystem type) goes all of the way to request_module.

    After having looked at this issue I don't think there is any
    particular reason to perform any filtering or permission checks beyond
    making it clear in the module request that we want a filesystem
    module. The common pattern in the kernel is to call request_module()
    without regards to the users permissions. In general all a filesystem
    module does once loaded is call register_filesystem() and go to sleep.
    Which means there is not much attack surface exposed by loading a
    filesytem module unless the filesystem is mounted. In a user
    namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
    which most filesystems do not set today.

    Acked-by: Serge Hallyn
    Acked-by: Kees Cook
    Reported-by: Kees Cook
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

28 Feb, 2013

3 commits

  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • There is no documented methods to mark FAT as dirty. Unofficially MS
    started to use reserved Byte in boot sector for this purpose, at least
    since Win 2000. With Win 7 user is warned if fs is dirty and asked to
    clean it.

    Different versions of Win, handle it in different ways, but always have
    same meaning:

    - Win 2000 and XP, set it on write operations and
    remove it after operation was finnished
    - Win 7, set dirty flag on first write and remove it on umount.

    We will do it as follows:

    - set dirty flag on mount. If fs was initially dirty, warn user,
    remember it and do not do any changes to boot sector.
    - clean it on umount. If fs was initially dirty, leave it dirty.
    - do not do any thing if fs mounted read-only.
    - TODO: leave fs dirty if we found some error after mount.

    Signed-off-by: Oleksij Rempel
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleksij Rempel
     
  • Later we will need "state" field to check if volume was cleanly unmounted.

    Signed-off-by: Oleksij Rempel
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleksij Rempel
     

23 Feb, 2013

1 commit


21 Dec, 2012

1 commit

  • fat_search_long() returns 0 on success, -ENOENT/ENOMEM on failure.
    Change the function comment accordingly.

    While at it, fix some trivial typos.

    Signed-off-by: Ravishankar N
    Signed-off-by: Namjae Jeon
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravishankar N
     

18 Dec, 2012

4 commits

  • Option parsing code expects an unsigned integer for the codepage option,
    but prefixes and stores this option with "cp" before passing to
    load_nls(). This makes the displayed option in /proc an invalid one.
    Strip the prefix when printing so that the displayed option is valid for
    reuse.

    Signed-off-by: Dave Reisner
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Reisner
     
  • parse_options() is supposed to return value < 0 on error however we
    returned 0 (success) in a lot of cases. This actually was not a problem
    in practice because match_token() used by parse_options() is clever and
    catches most of the problems for us.

    Signed-off-by: Jan Kara
    Cc: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • So far FAT either offsets time stamps by sys_tz.minuteswest or leaves them
    as they are (when tz=UTC mount option is used). However in some cases it
    is useful if one can specify time stamp offset on his own (e.g. when time
    zone of the camera connected is different from time zone of the computer,
    or when HW clock is in UTC and thus sys_tz.minuteswest == 0).

    So provide a mount option time_offset= which allows user to specify offset
    in minutes that should be applied to time stamps on the filesystem.

    akpm: this code would work incorrectly when used via `mount -o remount',
    because cached inodes would not be updated. But fatfs's fat_remount() is
    basically a no-op anyway.

    Signed-off-by: Jan Kara
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Change fatfs so that a warning is emitted when an attempt is made to mount
    a filesystem with the unsupported `discard' option.

    ext4 aready does this: http://patchwork.ozlabs.org/patch/192668/

    Signed-off-by: Namjae Jeon
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon