mds/Server: whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
osdc/Objecter: whitespace

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client: whitespace

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client: add barrier and types

This gives us a framework to implement commit operations that are
guaranteed to terminate even if unstable writes come in after commit
is called.

Adapted to use Boost interval classes by Adam Emerson
<aemerson@linuxbox.com>.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client/Client: return 1 from readdir cb on full

This appears to save us a bit of extra work trying to fill up the buffer
further than it can be filled.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client/Client: make open fhp argument optional

This is more natural for both FUSE and Ganesha.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client: switch ll_* methods to Inode* arguments

This commit implements a set of API changes proposed by
"David Zafman" <david.zafman@inktank.com>.

The principle change is consistently use Ceph Inode pointers as
context for inode operations, in place of materialized snapid,
inode# (vinodeno_t) tuples.

This provides a strictly handle-based interface to users.  They can either
do lookups themselves, or call a lookup method to get an Inode* from a
vinodeno_t.

(Build fixed in later commits, e.g., SyntheticClient.cc.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client: expose layout information

This allows us to construct pNFS layouts and DS filehandles that
match the Ceph clustering, placement, and striping structure.

(Includes pieces of API v2 by Matt.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Conflicts:
	src/client/Client.cc

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client: direct read/write methods that bypass cache, cap checks

These methods were created to implement pNFS data server support,
bypassing cap checks since the pNFS MDS holds a cap on behalf of
the client, realized in the recallable layout.

(Includes pieces of API v2 by Matt.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client/SyntheticClient: adapt to new ll_* interface

(Includes pieces of NFS interface widening by Adam.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
client/fuse_ll: adapt to new ll_ interface

This adapts the FUSE client to David Zafman's proposed interface
changes.

(Includes pieces of NFS interface widening by Adam.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Conflicts:
	src/client/fuse_ll.cc

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
libcephfs: expose new client ll_ interface

This patch exposes all changes made for interfacing with Ganesha
and layout support and David Zafman's proposed modifications to
the low-level API.

Signed-off-by: Adam Emerson <aemerson@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
libcephfs: add ceph_ll_lookup_root()

Signed-off-by: Andrey Kuznetsov <Andrey_Kuznetsov@epam.com>
libcephfs: add ceph_ll_listxattr

Signed-off-by: Andrey Kuznetsov <Andrey_Kuznetsov@epam.com>
libcephfs: add an xattr ll test

Signed-off-by: Andrey Kuznetsov <Andrey_Kuznetsov@epam.com>
mds: include requested caps (namely, xattrs) on getattr reply

For xattrs, we only include them in the reply if we are issuing caps on
them.  However, in the getattr case, we need to include the snapshot of the
current state.

The original problem is reproduced by LibCephFS.Xattrs_ll (a simple set
then get).

Signed-off-by: Sage Weil <sage@inktank.com>
client, libcephfs: make readlink sane

Supply a buffer and copy the data into it.  Do not ever expose internal
pointers from libcephfs's own cache.

Signed-off-by: Sage Weil <sage@inktank.com>
client: For rebase need to fix ll_readlink() call in Synthetic client

Signed-off-by: David Zafman <david.zafman@inktank.com>
fuse: fix for missing ll_ref on create

when the 'Inode **outp' argument was added to ll_create(), it was
changed to only take the ll_ref if outp was not NULL. fuse_ll_create()
was calling ll_create() with outp=NULL, and subsequently calling
fuse_reply_create() (which causes fuse to increment the lookup count)
without registering the initial ll_ref

this patch adds a dummy inode pointer i2 to the ll_create() call to
claim our initial reference

Signed-off-by: Casey Bodley <casey@linuxbox.com>
libcephfs: fix documentation for ceph_readlink

ceph_readlink() and ceph_ll_readlink() both return the number of bytes
copied on success, which the callers need to guarantee null-termination

Signed-off-by: Casey Bodley <casey@linuxbox.com>