Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small interface cleanups for struct ceph_statx #11093

Merged
merged 7 commits into from Sep 20, 2016
Merged

Commits on Sep 19, 2016

  1. client: reinstate clearing of *fhp in ll_create and don't allow fhp =…

    …= NULL
    
    The logic in ll_create relies on *fhp being zeroed out on entry into the
    function, but that's no longer being done since commit e08210d. Fix
    this by reinstating that initialization.
    
    Luckily, it looks like the two main callers (FUSE and nfs-ganesha)
    already handle this safely, but the SyntheticClient does not. Move the
    zeroing of the pointer into ll_create, and allow callers to pass in a
    pointer to an uninitialized value. With this, we can remove the
    initialization in the fuse client code as well.
    
    Also, we can get rid of some unneeded NULL pointer checks if we don't
    allow callers to pass in a NULL fhp pointer. As best I can tell, no one
    does that currently and no comments over ceph_ll_create seem to claim
    that this should be allowed.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 19, 2016
    Copy the full SHA
    436b7a6 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2016

  1. client: remove unneeded extra padding from ceph_statx

    Holdover from the proposed kernel API that doesn't really help anything
    here. If we ever want to extend this struct, we'll just append to the
    end and add new want mask bits.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    d1bfc9a View commit details
    Browse the repository at this point in the history
  2. client: switch ceph_statx time fields to struct timespec

    This is just much more convenient for applications that want to use
    the API. We're not talking to the kernel here, so there's no real
    reason we need to use fixed length fields.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    897213d View commit details
    Browse the repository at this point in the history
  3. client: convert ceph_statx to use dev_t for devices

    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    6e33242 View commit details
    Browse the repository at this point in the history
  4. Revert "client: move the device bitshift handling macros to Client.h"

    This reverts commit 2115de0.
    
    This is unnecessary now that we're using dev_t's in ceph_statx.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    ab1cf1d View commit details
    Browse the repository at this point in the history
  5. client: remove unimplemented fields from ceph_statx

    We don't provide stx_version and stx_information is currently unused.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    e64493c View commit details
    Browse the repository at this point in the history
  6. client: always provide the file type in stx_mode

    The proposed statx interface does this, and this would allow ganesha
    to get away without requesting CEPH_STATX_MODE when all it wants is
    enough to instantiate a filehandle.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    jtlayton committed Sep 20, 2016
    Copy the full SHA
    b332eed View commit details
    Browse the repository at this point in the history