25 Jan, 2016

1 commit

  • Pull Ceph updates from Sage Weil:
    "The two main changes are aio support in CephFS, and a series that
    fixes several issues in the authentication key timeout/renewal code.

    On top of that are a variety of cleanups and minor bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    libceph: remove outdated comment
    libceph: kill off ceph_x_ticket_handler::validity
    libceph: invalidate AUTH in addition to a service ticket
    libceph: fix authorizer invalidation, take 2
    libceph: clear messenger auth_retry flag if we fault
    libceph: fix ceph_msg_revoke()
    libceph: use list_for_each_entry_safe
    ceph: use i_size_{read,write} to get/set i_size
    ceph: re-send AIO write request when getting -EOLDSNAP error
    ceph: Asynchronous IO support
    ceph: Avoid to propagate the invalid page point
    ceph: fix double page_unlock() in page_mkwrite()
    rbd: delete an unnecessary check before rbd_dev_destroy()
    libceph: use list_next_entry instead of list_entry_next
    ceph: ceph_frag_contains_value can be boolean
    ceph: remove unused functions in ceph_frag.h

    Linus Torvalds
     

23 Jan, 2016

1 commit

  • parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
    inode_foo(inode) being mutex_foo(&inode->i_mutex).

    Please, use those for access to ->i_mutex; over the coming cycle
    ->i_mutex will become rwsem, with ->lookup() done with it held
    only shared.

    Signed-off-by: Al Viro

    Al Viro
     

22 Jan, 2016

1 commit


03 Nov, 2015

1 commit


03 Apr, 2014

1 commit

  • The object store limit needs to be updated after writing,
    and this can be done provided the corresponding object has already
    been initialized. Current object initialization is done asynchrously,
    which introduce a race if a file is opened, then immediately followed
    by a writing, the initialization may have not completed, the code will
    reach the ASSERT in fscache_submit_exclusive_op() to cause kernel
    bug.

    Tested-by: Milosz Tanski
    Signed-off-by: Yunchuan Wen
    Signed-off-by: Min Chen
    Signed-off-by: Li Wang

    Yunchuan Wen
     

27 Nov, 2013

1 commit

  • Pull ceph bug-fixes from Sage Weil:
    "These include a couple fixes to the new fscache code that went in
    during the last cycle (which will need to go stable@ shortly as well),
    a couple client-side directory fragmentation fixes, a fix for a race
    in the cap release queuing path, and a couple race fixes in the
    request abort and resend code.

    Obviously some of this could have gone into 3.12 final, but I
    preferred to overtest rather than send things in for a late -rc, and
    then my travel schedule intervened"

    * 'for-linus-bugs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: allocate non-zero page to fscache in readpage()
    ceph: wake up 'safe' waiters when unregistering request
    ceph: cleanup aborted requests when re-sending requests.
    ceph: handle race between cap reconnect and cap release
    ceph: set caps count after composing cap reconnect message
    ceph: queue cap release in __ceph_remove_cap()
    ceph: handle frag mismatch between readdir request and reply
    ceph: remove outdated frag information
    ceph: hung on ceph fscache invalidate in some cases

    Linus Torvalds
     

28 Sep, 2013

1 commit

  • Provide the ability to enable and disable fscache cookies. A disabled cookie
    will reject or ignore further requests to:

    Acquire a child cookie
    Invalidate and update backing objects
    Check the consistency of a backing object
    Allocate storage for backing page
    Read backing pages
    Write to backing pages

    but still allows:

    Checks/waits on the completion of already in-progress objects
    Uncaching of pages
    Relinquishment of cookies

    Two new operations are provided:

    (1) Disable a cookie:

    void fscache_disable_cookie(struct fscache_cookie *cookie,
    bool invalidate);

    If the cookie is not already disabled, this locks the cookie against other
    dis/enablement ops, marks the cookie as being disabled, discards or
    invalidates any backing objects and waits for cessation of activity on any
    associated object.

    This is a wrapper around a chunk split out of fscache_relinquish_cookie(),
    but it reinitialises the cookie such that it can be reenabled.

    All possible failures are handled internally. The caller should consider
    calling fscache_uncache_all_inode_pages() afterwards to make sure all page
    markings are cleared up.

    (2) Enable a cookie:

    void fscache_enable_cookie(struct fscache_cookie *cookie,
    bool (*can_enable)(void *data),
    void *data)

    If the cookie is not already enabled, this locks the cookie against other
    dis/enablement ops, invokes can_enable() and, if the cookie is not an
    index cookie, will begin the procedure of acquiring backing objects.

    The optional can_enable() function is passed the data argument and returns
    a ruling as to whether or not enablement should actually be permitted to
    begin.

    All possible failures are handled internally. The cookie will only be
    marked as enabled if provisional backing objects are allocated.

    A later patch will introduce these to NFS. Cookie enablement during nfs_open()
    is then contingent on i_writecount <dhowells@redhat.com

    David Howells
     

26 Sep, 2013

1 commit

  • In some cases I'm on my ceph client cluster I'm seeing hunk kernel tasks in
    the invalidate page code path. This is due to the fact that we don't check if
    the page is marked as cache before calling fscache_wait_on_page_write().

    This is the log from the hang

    INFO: task XXXXXX:12034 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    ...
    Call Trace:
    [] schedule+0x29/0x70
    [] __fscache_wait_on_page_write+0x6d/0xb0 [fscache]
    [] ? add_wait_queue+0x60/0x60
    [] ceph_invalidate_fscache_page+0x29/0x50 [ceph]
    [] ceph_invalidatepage+0x70/0x190 [ceph]
    [] ? delete_from_page_cache+0x5f/0x70
    [] truncate_inode_page+0x8b/0x90
    [] truncate_inode_pages_range.part.12+0x13d/0x620
    [] truncate_inode_pages_range+0x4d/0x60
    [] truncate_inode_pages+0x15/0x20
    [] evict+0x1a6/0x1b0
    [] iput+0x103/0x190
    ...

    Signed-off-by: Milosz Tanski
    Reviewed-by: Sage Weil

    Milosz Tanski
     

07 Sep, 2013

4 commits

  • The linux-next build bot found a three of warnings, this addresses all of them.

    * non-ANSI function declaration of function 'ceph_fscache_register' and
    'ceph_fscache_unregister'
    * symbol 'ceph_cache_netfs' was not declared, now it's extern in the header.
    * warning: "pr_fmt" redefined

    Signed-off-by: Milosz Tanski

    Milosz Tanski
     
  • Previously we would always try to enqueue work even if the filesystem is not
    mounted with fscache enabled (or the file has no cookie). In the case of the
    filesystem mouned nofsc (but with fscache compiled in) this would lead to a
    crash.

    Signed-off-by: Milosz Tanski

    Milosz Tanski
     
  • Previously ceph_readpage_to_fscache did not call if page was marked as cached
    before calling fscache_write_page resulting in a BUG inside of fscache.

    FS-Cache: Assertion failed
    ------------[ cut here ]------------
    kernel BUG at fs/fscache/page.c:874!
    invalid opcode: 0000 [#1] SMP
    Call Trace:
    [] __ceph_readpage_to_fscache+0x66/0x80 [ceph]
    [] readpage_nounlock+0x124/0x210 [ceph]
    [] ceph_readpage+0x1d/0x40 [ceph]
    [] generic_file_aio_read+0x1f6/0x700
    [] ceph_aio_read+0x5fc/0xab0 [ceph]

    Signed-off-by: Milosz Tanski
    Signed-off-by: Sage Weil

    Milosz Tanski
     
  • Adding support for fscache to the Ceph filesystem. This would bring it to on
    par with some of the other network filesystems in Linux (like NFS, AFS, etc...)

    In order to mount the filesystem with fscache the 'fsc' mount option must be
    passed.

    Signed-off-by: Milosz Tanski
    Signed-off-by: Sage Weil

    Milosz Tanski