07 Jan, 2012

1 commit


04 Jan, 2012

1 commit

  • Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
    it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
    the cost of taking it into inode_init_always() will be negligible for pipes
    and sockets and negative for everything else. Not to mention the removal of
    boilerplate code from ->destroy_inode() instances...

    Signed-off-by: Al Viro

    Al Viro
     

14 Dec, 2011

1 commit


02 Nov, 2011

1 commit


13 Sep, 2011

1 commit

  • Commit 37fb3a30b4 ("fuse: fix flock") added in 3.1-rc4 caused flock() to
    fail with ENOSYS with the kernel ABI version 7.16 or earlier.

    Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
    and earlier.

    Reported-by: Martin Ziegler
    Signed-off-by: Miklos Szeredi
    Tested-by: Martin Ziegler
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

25 Aug, 2011

1 commit


08 Aug, 2011

1 commit

  • Commit a9ff4f87 "fuse: support BSD locking semantics" overlooked a
    number of issues with supporing flock locks over existing POSIX
    locking infrastructure:

    - it's not backward compatible, passing flock(2) calls to userspace
    unconditionally (if userspace sets FUSE_POSIX_LOCKS)

    - it doesn't cater for the fact that flock locks are automatically
    unlocked on file release

    - it doesn't take into account the fact that flock exclusive locks
    (write locks) don't need an fd opened for write.

    The last one invalidates the original premise of the patch that flock
    locks can be emulated with POSIX locks.

    This patch fixes the first two issues. The last one needs to be fixed
    in userspace if the filesystem assumed that a write lock will happen
    only on a file operned for write (as in the case of the current fuse
    library).

    Reported-by: Sebastian Pipping
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     

04 Jun, 2011

1 commit

  • Caching "we have already removed suid/caps" was overenthusiastic as merged.
    On network filesystems we might have had suid/caps set on another client,
    silently picked by this client on revalidate, all of that *without* clearing
    the S_NOSEC flag.

    AFAICS, the only reasonably sane way to deal with that is
    * new superblock flag; unless set, S_NOSEC is not going to be set.
    * local block filesystems set it in their ->mount() (more accurately,
    mount_bdev() does, so does btrfs ->mount(), users of mount_bdev() other than
    local block ones clear it)
    * if any network filesystem (or a cluster one) wants to use S_NOSEC,
    it'll need to set MS_NOSEC in sb->s_flags *AND* take care to clear S_NOSEC when
    inode attribute changes are picked from other clients.

    It's not an earth-shattering hole (anybody that can set suid on another client
    will almost certainly be able to write to the file before doing that anyway),
    but it's a bug that needs fixing.

    Signed-off-by: Al Viro

    Al Viro
     

01 Jun, 2011

1 commit


25 Mar, 2011

1 commit

  • * 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
    Documentation/iostats.txt: bit-size reference etc.
    cfq-iosched: removing unnecessary think time checking
    cfq-iosched: Don't clear queue stats when preempt.
    blk-throttle: Reset group slice when limits are changed
    blk-cgroup: Only give unaccounted_time under debug
    cfq-iosched: Don't set active queue in preempt
    block: fix non-atomic access to genhd inflight structures
    block: attempt to merge with existing requests on plug flush
    block: NULL dereference on error path in __blkdev_get()
    cfq-iosched: Don't update group weights when on service tree
    fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
    block: Require subsystems to explicitly allocate bio_set integrity mempool
    jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    fs: make fsync_buffers_list() plug
    mm: make generic_writepages() use plugging
    blk-cgroup: Add unaccounted time to timeslice_used.
    block: fixup plugging stubs for !CONFIG_BLOCK
    block: remove obsolete comments for blkdev_issue_zeroout.
    blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
    ...

    Fix up conflicts in fs/{aio.c,super.c}

    Linus Torvalds
     

14 Mar, 2011

1 commit

  • The exportfs encode handle function should return the minimum required
    handle size. This helps user to find out the handle size by passing 0
    handle size in the first step and then redoing to the call again with
    the returned handle size value.

    Acked-by: Serge Hallyn
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Al Viro

    Aneesh Kumar K.V
     

10 Mar, 2011

1 commit

  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     

13 Jan, 2011

1 commit


10 Jan, 2011

1 commit


07 Jan, 2011

2 commits

  • Reduce some branches and memory accesses in dcache lookup by adding dentry
    flags to indicate common d_ops are set, rather than having to check them.
    This saves a pointer memory access (dentry->d_op) in common path lookup
    situations, and saves another pointer load and branch in cases where we
    have d_op but not the particular operation.

    Patched with:

    git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • RCU free the struct inode. This will allow:

    - Subsequent store-free path walking patch. The inode must be consulted for
    permissions when walking, so an RCU inode reference is a must.
    - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
    to take i_lock no longer need to take sb_inode_list_lock to walk the list in
    the first place. This will simplify and optimize locking.
    - Could remove some nested trylock loops in dcache code
    - Could potentially simplify things a bit in VM land. Do not need to take the
    page lock to follow page->mapping.

    The downsides of this is the performance cost of using RCU. In a simple
    creat/unlink microbenchmark, performance drops by about 10% due to inability to
    reuse cache-hot slab objects. As iterations increase and RCU freeing starts
    kicking over, this increases to about 20%.

    In cases where inode lifetimes are longer (ie. many inodes may be allocated
    during the average life span of a single inode), a lot of this cache reuse is
    not applicable, so the regression caused by this patch is smaller.

    The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
    however this adds some complexity to list walking and store-free path walking,
    so I prefer to implement this at a later date, if it is shown to be a win in
    real situations. I haven't found a regression in any non-micro benchmark so I
    doubt it will be a problem.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

08 Dec, 2010

1 commit

  • Terje Malmedal reports that a fuse filesystem with 32 million inodes
    on a machine with lots of memory can go unresponsive for up to 30
    minutes when all those inodes are evicted from the icache.

    The reason is that FORGET messages, sent when the inode is evicted,
    are queued up together with regular filesystem requests, and while the
    huge queue of FORGET messages are processed no other filesystem
    operation can proceed.

    Since a full fuse request structure is allocated for each inode, these
    take up quite a bit of memory as well.

    To solve these issues, create a slim 'fuse_forget_link' structure
    containing just the minimum of information required to send the FORGET
    request and chain these on a separate queue.

    When userspace is asking for a request make sure that FORGET and
    non-FORGET requests are selected fairly: for each 8 non-FORGET allow
    16 FORGET requests. This will make sure FORGETs do not pile up, yet
    other requests are also allowed to proceed while the queued FORGETs
    are processed.

    Reported-by: Terje Malmedal
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     

29 Oct, 2010

2 commits


10 Aug, 2010

1 commit


09 Feb, 2010

1 commit

  • In particular, several occurances of funny versions of 'success',
    'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
    'beginning', 'desirable', 'separate' and 'necessary' are fixed.

    Signed-off-by: Daniel Mack
    Cc: Joe Perches
    Cc: Junio C Hamano
    Signed-off-by: Jiri Kosina

    Daniel Mack
     

24 Sep, 2009

1 commit

  • Update some fs code to make use of new helper functions introduced
    in the previous patch. Should be no significant change in behaviour
    (except CIFS now calls send_sig under i_lock, via inode_newsize_ok).

    Reviewed-by: Christoph Hellwig
    Acked-by: Miklos Szeredi
    Cc: linux-nfs@vger.kernel.org
    Cc: Trond.Myklebust@netapp.com
    Cc: linux-cifs-client@lists.samba.org
    Cc: sfrench@samba.org
    Signed-off-by: Nick Piggin
    Signed-off-by: Al Viro

    npiggin@suse.de
     

19 Sep, 2009

1 commit


16 Sep, 2009

3 commits

  • We do this automatically in get_sb_bdev() from the set_bdev_super()
    callback. Filesystems that have their own private backing_dev_info
    must assign that in ->fill_super().

    Note that ->s_bdi assignment is required for proper writeback!

    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Make the max_background and congestion_threshold parameters of a FUSE
    mount tunable at runtime by adding the respective knobs to its directory
    within the fusectl filesystem.

    Signed-off-by: Csaba Henk
    Signed-off-by: Miklos Szeredi

    Csaba Henk
     
  • An untrusted user could DoS the system if s/he were allowed to accumulate an
    arbitrary number of pending background requests by setting the above limits
    to extremely high values in INIT. This patch excludes this possibility by
    imposing global upper limits on the possible values of per-mount "max
    background requests" and "congestion threshold" parameters for unprivileged
    FUSE filesystems.

    These global limits are implemented as module parameters.

    Signed-off-by: Csaba Henk
    Signed-off-by: Miklos Szeredi

    Csaba Henk
     

11 Sep, 2009

1 commit


07 Jul, 2009

1 commit


01 Jul, 2009

2 commits

  • Add notification messages that allow the filesystem to invalidate VFS
    caches.

    Two notifications are added:

    1) inode invalidation

    - invalidate cached attributes
    - invalidate a range of pages in the page cache (this is optional)

    2) dentry invalidation

    - try to invalidate a subtree in the dentry cache

    Care must be taken while accessing the 'struct super_block' for the
    mount, as it can go away while an invalidation is in progress. To
    prevent this, introduce a rw-semaphore, that is taken for read during
    the invalidation and taken for write in the ->kill_sb callback.

    Cc: Csaba Henk
    Cc: Anand Avati
    Signed-off-by: Miklos Szeredi

    John Muir
     
  • This patch lets filesystems handle masking the file mode on creation.
    This is needed if filesystem is using ACLs.

    - The CREATE, MKDIR and MKNOD requests are extended with a "umask"
    parameter.

    - A new FUSE_DONT_MASK flag is added to the INIT request/reply. With
    this the filesystem may request that the create mode is not masked.

    CC: Jean-Pierre André
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     

17 Jun, 2009

1 commit


13 Jun, 2009

1 commit

  • * 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
    CUSE: implement CUSE - Character device in Userspace
    fuse: export symbols to be used by CUSE
    fuse: update fuse_conn_init() and separate out fuse_conn_kill()
    fuse: don't use inode in fuse_file_poll
    fuse: don't use inode in fuse_do_ioctl() helper
    fuse: don't use inode in fuse_sync_release()
    fuse: create fuse_do_open() helper for CUSE
    fuse: clean up args in fuse_finish_open() and fuse_release_fill()
    fuse: don't use inode in helpers called by fuse_direct_io()
    fuse: add members to struct fuse_file
    fuse: prepare fuse_direct_io() for CUSE
    fuse: clean up fuse_write_fill()
    fuse: use struct path in release structure
    fuse: misc cleanups

    Linus Torvalds
     

14 May, 2009

1 commit


09 May, 2009

1 commit


28 Apr, 2009

3 commits

  • Export the following symbols for CUSE.

    fuse_conn_put()
    fuse_conn_get()
    fuse_conn_kill()
    fuse_send_init()
    fuse_do_open()
    fuse_sync_release()
    fuse_direct_io()
    fuse_do_ioctl()
    fuse_file_poll()
    fuse_request_alloc()
    fuse_get_req()
    fuse_put_request()
    fuse_request_send()
    fuse_abort_conn()
    fuse_dev_release()
    fuse_dev_operations

    Signed-off-by: Tejun Heo
    Signed-off-by: Miklos Szeredi

    Tejun Heo
     
  • Update fuse_conn_init() such that it doesn't take @sb and move bdi
    registration into a separate function. Also separate out
    fuse_conn_kill() from fuse_put_super().

    These will be used to implement cuse.

    Signed-off-by: Tejun Heo
    Signed-off-by: Miklos Szeredi

    Tejun Heo
     
  • Destroy bdi on error in fuse_fill_super().

    This was an omission from commit 26c3679101dbccc054dcf370143941844ba70531
    "fuse: destroy bdi on umount", which moved the bdi_destroy() call from
    fuse_conn_put() to fuse_put_super().

    Signed-off-by: Miklos Szeredi
    CC: stable@kernel.org

    Miklos Szeredi
     

26 Jan, 2009

3 commits

  • If a fuse filesystem is unmounted but the device file descriptor
    remains open and a new mount reuses the old device number, then the
    mount fails with EEXIST and the following warning is printed in the
    kernel log:

    WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x35/0x3d()
    sysfs: duplicate filename '0:15' can not be created

    The cause is that the bdi belonging to the fuse filesystem was
    destoryed only after the device file was released. Fix this by
    calling bdi_destroy() from fuse_put_super() instead.

    Signed-off-by: Miklos Szeredi
    CC: stable@kernel.org

    Miklos Szeredi
     
  • Clean up error handling for the whole of fuse_fill_super() function.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • Fix the leaking file reference if allocation or initialization of
    fuse_conn failed.

    Signed-off-by: Miklos Szeredi
    CC: stable@kernel.org

    Miklos Szeredi