09 Oct, 2012

1 commit

  • Move actual pte filling for non-linear file mappings into the new special
    vma operation: ->remap_pages().

    Filesystems must implement this method to get non-linear mapping support,
    if it uses filemap_fault() then generic_file_remap_pages() can be used.

    Now device drivers can implement this method and obtain nonlinear vma support.

    Signed-off-by: Konstantin Khlebnikov
    Cc: Alexander Viro
    Cc: Carsten Otte
    Cc: Chris Metcalf #arch/tile
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: H. Peter Anvin
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: James Morris
    Cc: Jason Baron
    Cc: Kentaro Takeda
    Cc: Matt Helsley
    Cc: Nick Piggin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Suresh Siddha
    Cc: Tetsuo Handa
    Cc: Venkatesh Pallipadi
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

03 Oct, 2012

1 commit

  • There's no reason to call rcu_barrier() on every
    deactivate_locked_super(). We only need to make sure that all delayed rcu
    free inodes are flushed before we destroy related cache.

    Removing rcu_barrier() from deactivate_locked_super() affects some fast
    paths. E.g. on my machine exit_group() of a last process in IPC
    namespace takes 0.07538s. rcu_barrier() takes 0.05188s of that time.

    Signed-off-by: Kirill A. Shutemov
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Kirill A. Shutemov
     

27 Sep, 2012

1 commit


05 Sep, 2012

1 commit


03 Sep, 2012

1 commit

  • gcc 4.6.3 complains about uninitialized variables in fs/fuse/control.c:

    CC fs/fuse/control.o
    fs/fuse/control.c: In function 'fuse_conn_congestion_threshold_write':
    fs/fuse/control.c:165:29: warning: 'val' may be used uninitialized in this function [-Wuninitialized]
    fs/fuse/control.c: In function 'fuse_conn_max_background_write':
    fs/fuse/control.c:128:23: warning: 'val' may be used uninitialized in this function [-Wuninitialized]

    fuse_conn_limit_write() will always return non-zero unless the &val
    is modified, so the warning is misleading. Let the compiler know
    about it by marking 'val' with 'uninitialized_var'.

    Signed-off-by: Daniel Mack
    Cc: Brian Foster
    Signed-off-by: Miklos Szeredi

    Daniel Mack
     

31 Aug, 2012

2 commits

  • Luca Risolia reported that a CUSE daemon will continue to run even if
    initialization of the emulated device failes for some reason (e.g. the device
    number is already registered by another driver).

    This patch disconnects the fuse device on error, which will make the userspace
    CUSE daemon exit, albeit without indication about what the problem was.

    Reported-by: Luca Risolia
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • fuse_conn_kill() removed fc->entry, called fuse_ctl_remove_conn() and
    fuse_bdi_destroy(). None of which is appropriate for cuse cleanup.

    The fuse_ctl_remove_conn() decrements the nlink on the control filesystem, which
    is totally bogus. The others are harmless but unnecessary.

    So move these out from fuse_conn_kill() to fuse_put_super() where they belong.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     

19 Aug, 2012

1 commit

  • Pull vfs fixes from Miklos Szeredi.

    This mainly fixes some confusion about whether the open 'mode' variable
    passed around should contain the full file type (S_IFREG etc)
    information or just the permission mode. In particular, the lack of
    proper file type information had confused fuse.

    * 'vfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
    vfs: fix propagation of atomic_open create error on negative dentry
    fuse: check create mode in atomic open
    vfs: pass right create mode to may_o_create()
    vfs: atomic_open(): fix create mode usage
    vfs: canonicalize create mode in build_open_flags()

    Linus Torvalds
     

17 Aug, 2012

1 commit


15 Aug, 2012

1 commit


07 Aug, 2012

1 commit

  • Commit 7572777eef78ebdee1ecb7c258c0ef94d35bad16 attempted to verify that
    the total iovec from the client doesn't overflow iov_length() but it
    only checked the first element. The iovec could still overflow by
    starting with a small element. The obvious fix is to check all the
    elements.

    The overflow case doesn't look dangerous to the kernel as the copy is
    limited by the length after the overflow. This fix restores the
    intention of returning an error instead of successfully copying less
    than the iovec represented.

    I found this by code inspection. I built it but don't have a test case.
    I'm cc:ing stable because the initial commit did as well.

    Signed-off-by: Zach Brown
    Signed-off-by: Miklos Szeredi
    CC: [2.6.37+]

    Zach Brown
     

31 Jul, 2012

1 commit


18 Jul, 2012

4 commits

  • Add missing flags that userspace derived from the protocol version number. This
    makes the protocol more flexible.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • A fuse-based network filesystem might allow for the inode
    and/or file data to change unexpectedly. A local client
    that opens and repeatedly reads a file might never pick
    up on such changes and indefinitely return stale data.

    Always invoke fuse_update_attributes() in the read path
    to cause an attr revalidation when the attributes expire.
    This leads to a page cache invalidation if necessary and
    ensures fuse issues new read requests to the fuse client.

    The original logic (reval only on reads beyond EOF) is
    preserved unless the client specifies FUSE_AUTO_INVAL_DATA
    on init.

    Signed-off-by: Brian Foster
    Signed-off-by: Miklos Szeredi

    Brian Foster
     
  • We currently invalidate the inode address space mapping
    if the file size changes unexpectedly. In the case of a
    fuse network filesystem, a portion of a file could be
    overwritten remotely without changing the file size.
    Compare the old mtime as well to detect this condition
    and invalidate the mapping if the file has been updated.

    The original logic (to ignore changes in mtime) is
    preserved unless the client specifies FUSE_AUTO_INVAL_DATA
    on init.

    Signed-off-by: Brian Foster
    Signed-off-by: Miklos Szeredi

    Brian Foster
     
  • FUSE_AUTO_INVAL_DATA is provided to enable updated/auto cache
    invalidation logic.

    Signed-off-by: Brian Foster
    Signed-off-by: Miklos Szeredi

    Brian Foster
     

14 Jul, 2012

9 commits


06 Jun, 2012

1 commit


02 Jun, 2012

1 commit

  • Btrfs has to make sure we have space to allocate new blocks in order to modify
    the inode, so updating time can fail. We've gotten around this by having our
    own file_update_time but this is kind of a pain, and Christoph has indicated he
    would like to make xfs do something different with atime updates. So introduce
    ->update_time, where we will deal with i_version an a/m/c time updates and
    indicate which changes need to be made. The normal version just does what it
    has always done, updates the time and marks the inode dirty, and then
    filesystems can choose to do something different.

    I've gone through all of the users of file_update_time and made them check for
    errors with the exception of the fault code since it's complicated and I wasn't
    quite sure what to do there, also Jan is going to be pushing the file time
    updates into page_mkwrite for those who have it so that should satisfy btrfs and
    make it not a big deal to check the file_update_time() return code in the
    generic fault path. Thanks,

    Signed-off-by: Josef Bacik

    Josef Bacik
     

30 May, 2012

1 commit

  • pass inode + parent's inode or NULL instead of dentry + bool saying
    whether we want the parent or not.

    NOTE: that needs ceph fix folded in.

    Signed-off-by: Al Viro

    Al Viro
     

29 May, 2012

1 commit

  • Pull writeback tree from Wu Fengguang:
    "Mainly from Jan Kara to avoid iput() in the flusher threads."

    * tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: Avoid iput() from flusher thread
    vfs: Rename end_writeback() to clear_inode()
    vfs: Move waiting for inode writeback from end_writeback() to evict_inode()
    writeback: Refactor writeback_single_inode()
    writeback: Remove wb->list_lock from writeback_single_inode()
    writeback: Separate inode requeueing after writeback
    writeback: Move I_DIRTY_PAGES handling
    writeback: Move requeueing when I_SYNC set to writeback_sb_inodes()
    writeback: Move clearing of I_SYNC into inode_sync_complete()
    writeback: initialize global_dirty_limit
    fs: remove 8 bytes of padding from struct writeback_control on 64 bit builds
    mm: page-writeback.c: local functions should not be exposed globally

    Linus Torvalds
     

14 May, 2012

2 commits

  • Don't use inode->i_blkbits which might be stale, instead calculate the blksize
    information from the freshly obtained attributes.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • Now we store attr->ino at inode->i_ino, return attr->ino at the
    first time and then return inode->i_ino if the attribute timeout
    isn't expired. That's wrong on 32 bit platforms because attr->ino
    is 64 bit and inode->i_ino is 32 bit in this case.

    Fix this by saving 64 bit ino in fuse_inode structure and returning
    it every time we call getattr. Also squash attr->ino into inode->i_ino
    explicitly.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Miklos Szeredi

    Pavel Shilovsky
     

06 May, 2012

1 commit

  • After we moved inode_sync_wait() from end_writeback() it doesn't make sense
    to call the function end_writeback() anymore. Rename it to clear_inode()
    which well says what the function really does - set I_CLEAR flag.

    Signed-off-by: Jan Kara
    Signed-off-by: Fengguang Wu

    Jan Kara
     

26 Apr, 2012

1 commit


25 Apr, 2012

2 commits

  • fallocate filesystem operation preallocates media space for the given file.
    If fallocate returns success then any subsequent write to the given range
    never fails with 'not enough space' error.

    Signed-off-by: Anatol Pomozov
    Signed-off-by: Miklos Szeredi

    Anatol Pomozov
     
  • This patch replaces the code for getting an number from a
    userspace buffer by a simple call to kstroul_from_user.
    This makes it easier to read and less error prone.

    Signed-off-by: Peter Huewe
    Signed-off-by: Miklos Szeredi

    Peter Huewe
     

19 Apr, 2012

1 commit


11 Apr, 2012

1 commit


22 Mar, 2012

1 commit

  • Pull vfs pile 1 from Al Viro:
    "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
    yet."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
    ext4: initialization of ext4_li_mtx needs to be done earlier
    debugfs-related mode_t whack-a-mole
    hfsplus: add an ioctl to bless files
    hfsplus: change finder_info to u32
    hfsplus: initialise userflags
    qnx4: new helper - try_extent()
    qnx4: get rid of qnx4_bread/qnx4_getblk
    take removal of PF_FORKNOEXEC to flush_old_exec()
    trim includes in inode.c
    um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it
    um: embed ->stub_pages[] into mmu_context
    gadgetfs: list_for_each_safe() misuse
    ocfs2: fix leaks on failure exits in module_init
    ecryptfs: make register_filesystem() the last potential failure exit
    ntfs: forgets to unregister sysctls on register_filesystem() failure
    logfs: missing cleanup on register_filesystem() failure
    jfs: mising cleanup on register_filesystem() failure
    make configfs_pin_fs() return root dentry on success
    configfs: configfs_create_dir() has parent dentry in dentry->d_parent
    configfs: sanitize configfs_create()
    ...

    Linus Torvalds
     

21 Mar, 2012

1 commit


20 Mar, 2012

1 commit