]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agodoc: Added clarification from Peter's feedback.
John Wilkins [Fri, 19 Oct 2012 22:40:33 +0000 (15:40 -0700)]
doc: Added clarification from Peter's feedback.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added backward compatibility text. Additional cleanup.
John Wilkins [Fri, 19 Oct 2012 22:40:03 +0000 (15:40 -0700)]
doc: Added backward compatibility text. Additional cleanup.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoman: update ceph-debugpack, ceph man pages
Sage Weil [Fri, 19 Oct 2012 17:42:48 +0000 (10:42 -0700)]
man: update ceph-debugpack, ceph man pages

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorbd: update man page build
Sage Weil [Fri, 19 Oct 2012 17:41:51 +0000 (10:41 -0700)]
rbd: update man page build

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: clean up doc build directions
Sage Weil [Fri, 19 Oct 2012 17:40:25 +0000 (10:40 -0700)]
doc: clean up doc build directions

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'noah/wip-java-cephfs'
Sage Weil [Fri, 19 Oct 2012 17:32:37 +0000 (10:32 -0700)]
Merge remote-tracking branch 'noah/wip-java-cephfs'

12 years agojava: update deb bits from ceph-devel feedback
Noah Watkins [Wed, 10 Oct 2012 20:57:03 +0000 (13:57 -0700)]
java: update deb bits from ceph-devel feedback

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add test for mount with bad root
Noah Watkins [Thu, 6 Sep 2012 17:41:51 +0000 (10:41 -0700)]
java: add test for mount with bad root

This adds a unit test that verifies that mounting Ceph with a
non-existent root directory throws FileNotFoundException.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMakefile: add src/include to #include path for libcephfs_jni_la
Sage Weil [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
Makefile: add src/include to #include path for libcephfs_jni_la

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodo_autogen.sh: add -j flag to enable java stuff
Sage Weil [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
do_autogen.sh: add -j flag to enable java stuff

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodebian: add libcephfs-java package
Noah Watkins [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
debian: add libcephfs-java package

Creates libceph1-java package that contains
the libcephfs Java wrappers .jar file and the
JNI library.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoautomake: setup autotools to build cephfs-java
Noah Watkins [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
automake: setup autotools to build cephfs-java

Adds --enable-cephfs-java and --with-jdk to build
the libcephfs Java bindings and specify the default
JDK directory, respectively.

Also adds default JDK paths to avoid --with-jdk in
the common case. Currently setup for the default
provided by Debian's default-jdk package, but other
default search paths can easily be added.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add Java and C++ source files
Noah Watkins [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
java: add Java and C++ source files

This adds all of the Java and C++ source files that make up the
libcephfs Java wrappers package.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agolibcephfs: return error when not mounted
Noah Watkins [Sat, 1 Sep 2012 17:26:41 +0000 (10:26 -0700)]
libcephfs: return error when not mounted

Return an error rather than a segfault if a client uses the interface
when unmounted.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'wip-3346'
Sam Lang [Fri, 19 Oct 2012 03:14:24 +0000 (22:14 -0500)]
Merge branch 'wip-3346'

12 years agorbd: implement bench-write command
Sage Weil [Thu, 18 Oct 2012 23:43:26 +0000 (16:43 -0700)]
rbd: implement bench-write command

We may want to change the command line args around later to make this
more friendly.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-rbd-stripe' (early part)
Sage Weil [Thu, 18 Oct 2012 23:42:15 +0000 (16:42 -0700)]
Merge branch 'wip-rbd-stripe' (early part)

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: print useful error message if striping is specified for format 1
Sage Weil [Tue, 9 Oct 2012 16:22:48 +0000 (09:22 -0700)]
rbd: print useful error message if striping is specified for format 1

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: Fix permissions checking for O_WRONLY
Sam Lang [Thu, 18 Oct 2012 20:21:10 +0000 (15:21 -0500)]
client: Fix permissions checking for O_WRONLY

O_RDONLY is 0 in glibc, so we have to assume the
flags bits are mutually exclusive, otherwise we always
request read perms and write-only modes break.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest: Make the test filename unique to test
Sam Lang [Thu, 18 Oct 2012 15:13:12 +0000 (10:13 -0500)]
test: Make the test filename unique to test

This fixes up the chmod test to use a unique
filename to test with, and avoid clobbering of
other tests and commonly named files.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix permissions error on open with O_CREAT
Sam Lang [Thu, 18 Oct 2012 15:02:17 +0000 (10:02 -0500)]
client: Fix permissions error on open with O_CREAT

Posix allows creating/opening a file with
open() with a mode that doesn't allow write (or read)
access but flags that request it: O_CREAT|O_WRONLY.
This means that correct permissions checking against
the mode on open() only happens if the file already exists.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoS3 test scripts
tamil [Thu, 18 Oct 2012 21:51:51 +0000 (14:51 -0700)]
S3 test scripts

Signed-off-by: tamil <tamil.muthamizhan@inktank.com
12 years agodoc: minor fix on user name for GW script.
John Wilkins [Thu, 18 Oct 2012 21:47:37 +0000 (14:47 -0700)]
doc: minor fix on user name for GW script.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoCleaned up
tamil [Thu, 18 Oct 2012 21:13:05 +0000 (14:13 -0700)]
Cleaned up

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Thu, 18 Oct 2012 06:00:25 +0000 (23:00 -0700)]
Merge branch 'next'

12 years agoaddr_parsing: make , and ; and ' ' all delimiters
Sage Weil [Thu, 18 Oct 2012 00:44:12 +0000 (17:44 -0700)]
addr_parsing: make , and ; and ' ' all delimiters

Instead of just ,.  Currently "foo.com, bar.com" will fail because of the
space after the comma.  This patches fixes that, and makes all delim
chars interchangeable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agovstart.sh: log client to out/$name.log
Sage Weil [Thu, 18 Oct 2012 01:03:42 +0000 (18:03 -0700)]
vstart.sh: log client to out/$name.log

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix signed/unsigned comparison warning
Sage Weil [Wed, 17 Oct 2012 22:42:42 +0000 (15:42 -0700)]
client: fix signed/unsigned comparison warning

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: MonitorStore: fix error checks for mkdir operations
Joao Eduardo Luis [Wed, 17 Oct 2012 20:21:01 +0000 (21:21 +0100)]
mon: MonitorStore: fix error checks for mkdir operations

We introduced a bug on the monitor store a couple of commits back that
would trigger a EEXIST error message when the store tried to make sure
a directory exists by trying to 'mkdir' it.

We now check if 'errno' is EEXIST and, if so, we ignore the error.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoleveldb: revert accidental rewind
Sage Weil [Wed, 17 Oct 2012 19:00:52 +0000 (12:00 -0700)]
leveldb: revert accidental rewind

In 51858b78640061cecb82ac7bab4ef99da5a92169.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: initialize tid in MetaRequest ctor
Sage Weil [Wed, 17 Oct 2012 18:59:36 +0000 (11:59 -0700)]
client: initialize tid in MetaRequest ctor

CID 717207 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "tid" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest/libcephfs: Fix telldir/seekdir test
Sam Lang [Wed, 17 Oct 2012 17:45:20 +0000 (12:45 -0500)]
test/libcephfs: Fix telldir/seekdir test

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest: Add libcephfs tests for stat, lstat, chmod
Sam Lang [Sun, 14 Oct 2012 19:01:19 +0000 (14:01 -0500)]
test:  Add libcephfs tests for stat, lstat, chmod

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix stat of relative symlinks
Sam Lang [Thu, 11 Oct 2012 17:16:02 +0000 (12:16 -0500)]
client: Fix stat of relative symlinks

Stat of symlinks that are relative to their location
would return -ENOENT because the symlink target is
being appended to the path rather than replacing it.
This fix replaces the symlink component with the path
of the symlink target (in the case that its a relative
symlink), and avoids updating the inode to point the
symlink (keeps at the parent).

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agodoc: Fix wrong wording for symlink xattrs calls
Sam Lang [Wed, 10 Oct 2012 16:08:15 +0000 (11:08 -0500)]
doc: Fix wrong wording for symlink xattrs calls

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Implement lchown in Client and libcephfs
Sam Lang [Wed, 10 Oct 2012 15:35:41 +0000 (10:35 -0500)]
client: Implement lchown in Client and libcephfs

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest: Add libcephfs tests for stat, lstat, chmod
Sam Lang [Sun, 14 Oct 2012 19:01:19 +0000 (14:01 -0500)]
test:  Add libcephfs tests for stat, lstat, chmod

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Implement stat and correct lstat
Sam Lang [Wed, 10 Oct 2012 15:16:53 +0000 (10:16 -0500)]
client: Implement stat and correct lstat

lstat is meant to not follow symbolic links in
the given path, whereas stat does.  This adds a
stat function to Client and libcephfs and changes
the behavior of lstat to not follow symlinks.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Support for fchmod
Sam Lang [Wed, 10 Oct 2012 14:33:34 +0000 (09:33 -0500)]
client: Support for fchmod

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge remote-tracking branch 'gh/mon-coverity-fixes'
Sage Weil [Wed, 17 Oct 2012 16:59:19 +0000 (09:59 -0700)]
Merge remote-tracking branch 'gh/mon-coverity-fixes'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: MonitorStore: check return value of 'rename' for errors
Joao Eduardo Luis [Wed, 17 Oct 2012 16:14:19 +0000 (17:14 +0100)]
mon: MonitorStore: check return value of 'rename' for errors

CID 716854: Unchecked return value (CHECKED_RETURN)
At (10): Calling function "rename(tfn, fn)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: MonitorStore: check mkdir return value for errors
Joao Eduardo Luis [Wed, 17 Oct 2012 16:12:59 +0000 (17:12 +0100)]
mon: MonitorStore: check mkdir return value for errors

CID 728081: Unchecked return value (CHECKED_RETURN)
At (5): Calling function "mkdir(dfn, 493U)" without checking return value.
CID 716853: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.
CID 716855: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: MonitorStore: check return value for errors on 'open'
Joao Eduardo Luis [Wed, 17 Oct 2012 15:40:07 +0000 (16:40 +0100)]
mon: MonitorStore: check return value for errors on 'open'

CID 728083: Argument cannot be negative (NEGATIVE_RETURNS)
At (22): "dirfd" is passed to a parameter that cannot be negative.
At (29): "dirfd" is passed to a parameter that cannot be negative.
CID 717445: Argument cannot be negative (NEGATIVE_RETURNS)
At (3): "dirfd" is passed to a parameter that cannot be negative.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: AuthMonitor: check return values
Joao Eduardo Luis [Wed, 17 Oct 2012 15:21:56 +0000 (16:21 +0100)]
mon: AuthMonitor: check return values

CID 716850: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "KeyServer::get_auth(EntityName const &,
EntityAuth &) const" without checking return value.

CID 716849: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "EntityName::from_str(std::string const &)"
without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: LogMonitor: check return value when writing to file
Joao Eduardo Luis [Wed, 17 Oct 2012 14:41:36 +0000 (15:41 +0100)]
mon: LogMonitor: check return value when writing to file

CID 716851: Unchecked return value (CHECKED_RETURN)
At (51): Calling function "ceph::buffer::list::write_fd(int) const"
without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: unlock before returning
Joao Eduardo Luis [Wed, 17 Oct 2012 14:31:44 +0000 (15:31 +0100)]
mon: Monitor: unlock before returning

CID 716947 (#1 of 2): Missing unlock (LOCK)
CID 716947 (#2 of 2): Missing unlock (LOCK)
At (25): Returning without unlocking "this->lock._m".

There were a couple of cases in Monitor::init() that could lead us to
return without properly unlocking. Coverity gets mad props for uncovering
this.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: fix potential null-pointer dereference
Joao Eduardo Luis [Wed, 17 Oct 2012 14:23:11 +0000 (15:23 +0100)]
mon: Monitor: fix potential null-pointer dereference

CID 717443: Dereference after null check (FORWARD_NULL)
At (14): Passing null pointer "detailbl" to function
"ceph::buffer::list::append(std::string const &)", which dereferences it.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoleveldb: update .gitignore
Sage Weil [Wed, 17 Oct 2012 04:29:34 +0000 (21:29 -0700)]
leveldb: update .gitignore

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-3301'
Sage Weil [Wed, 17 Oct 2012 04:06:00 +0000 (21:06 -0700)]
Merge branch 'wip-3301'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agotest: Add func. test for chmod in libcephfs
Sam Lang [Wed, 17 Oct 2012 01:13:48 +0000 (20:13 -0500)]
test: Add func. test for chmod in libcephfs

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Add permissions checking to open
Sam Lang [Tue, 16 Oct 2012 16:45:26 +0000 (11:45 -0500)]
client: Add permissions checking to open

Users of the libcephfs api (fuse in particular)
don't check the mode against the open flags.  This
commit does the proper checks to grant/deny access
to the file.  The check_mode() function constructs
a requested mode based on the flags, and compares that
to the mode of the file.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agorbd: reject negative size (can make image that is hard to delete)
Dan Mick [Wed, 17 Oct 2012 01:22:35 +0000 (18:22 -0700)]
rbd: reject negative size (can make image that is hard to delete)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoradosgw: fix compile warning
Sage Weil [Wed, 17 Oct 2012 00:27:28 +0000 (17:27 -0700)]
radosgw: fix compile warning

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Gary Lowell [Tue, 16 Oct 2012 23:27:21 +0000 (23:27 +0000)]
Merge branch 'next'

12 years agodoc: Updated the cephx section of the toc for cluster ops.
John Wilkins [Tue, 16 Oct 2012 22:24:11 +0000 (15:24 -0700)]
doc: Updated the cephx section of the toc for cluster ops.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Did a little clean-up work in the cephx guide.
John Wilkins [Tue, 16 Oct 2012 22:23:34 +0000 (15:23 -0700)]
doc: Did a little clean-up work in the cephx guide.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added a new intro for cephx authentication.
John Wilkins [Tue, 16 Oct 2012 22:22:25 +0000 (15:22 -0700)]
doc: Added a new intro for cephx authentication.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorgw: multiple coverity fixes
Yehuda Sadeh [Tue, 16 Oct 2012 21:13:01 +0000 (14:13 -0700)]
rgw: multiple coverity fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agotest: Add a workunit for chmod
Sam Lang [Sun, 14 Oct 2012 19:24:58 +0000 (14:24 -0500)]
test: Add a workunit for chmod

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: explicitly queue messages for unconnected clients
Sage Weil [Tue, 16 Oct 2012 20:03:53 +0000 (13:03 -0700)]
mds: explicitly queue messages for unconnected clients

Previously, the messenger would queue messages for a destination that
didn't exist when you were a server; that changed a while back with the
wip-msgr merge (circa v0.52).  The result is that when we force open
client sessions and queue messages, they are dropped on the floor and the
client--when it does connect--gets confusing stuff from the MDS.

Instead, explicitly queue and send these messages.  Also, *always* send
via the Connection* instead of the inst.

Fixes: #2681
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix implemented caps update on release/flush
Sage Weil [Tue, 16 Oct 2012 18:47:29 +0000 (11:47 -0700)]
client: fix implemented caps update on release/flush

When we release caps, clear them out of implemented as well, unless we
still hold references.  Otherwise implemented ends up holding all sorts of
extra caps (e.g., when nothing is getting revoked), leading to confusion
later down the line.

This now mirrors the kernel code.

Fixes: #3301
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMClientRequest: fix mode formatting
Sage Weil [Tue, 16 Oct 2012 18:10:35 +0000 (11:10 -0700)]
MClientRequest: fix mode formatting

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agov0.43 v0.53
Gary Lowell [Tue, 16 Oct 2012 17:42:36 +0000 (17:42 +0000)]
v0.43

12 years agoMerge remote-tracking branch 'gh/wip-fedora18' into next
Sage Weil [Tue, 16 Oct 2012 16:05:55 +0000 (09:05 -0700)]
Merge remote-tracking branch 'gh/wip-fedora18' into next

12 years agoradosgw-admin manpage: Fix broken quotes
Dan Mick [Tue, 16 Oct 2012 01:18:18 +0000 (18:18 -0700)]
radosgw-admin manpage: Fix broken quotes

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoadmin_socket: fix '0' protocol version
Sage Weil [Mon, 15 Oct 2012 23:37:05 +0000 (16:37 -0700)]
admin_socket: fix '0' protocol version

Broken by 895e24d198ced83ab7fed3725f12f75e3bc97b0b.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorbd: fix striping feature bit addition
Sage Weil [Tue, 9 Oct 2012 16:22:09 +0000 (09:22 -0700)]
rbd: fix striping feature bit addition

Add the STRIPINGV2 feature bit when striping is non-default.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: log why create failed when striping features missing
Sage Weil [Tue, 9 Oct 2012 16:21:27 +0000 (09:21 -0700)]
librbd: log why create failed when striping features missing

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: use map-based stripe method to avoid fragmenting io
Sage Weil [Mon, 8 Oct 2012 23:04:21 +0000 (16:04 -0700)]
librbd: use map-based stripe method to avoid fragmenting io

If we have multiple extents to read from the parent, accumulate the
resulting IO requests on a single map of ObjectExtents so that we can
merge adjacent IOs.  This helps with the copy-up when the parent and child
striping match, for example.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agostriper: expose method that works directrly from a map<>
Sage Weil [Mon, 8 Oct 2012 23:02:12 +0000 (16:02 -0700)]
striper: expose method that works directrly from a map<>

Some callers will want to call the stripe method multiple times and
accumulate IO on a single result set.  Expose access to the map<> that was
previously internally used for this and do the map -> vector conversion
in a wrapper.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoStriper: move from Filer
Sage Weil [Mon, 8 Oct 2012 22:53:03 +0000 (15:53 -0700)]
Striper: move from Filer

Move all the static striping code from Filer to Striper.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: implement user-facing image to image copy
Sage Weil [Mon, 8 Oct 2012 21:43:25 +0000 (14:43 -0700)]
librbd: implement user-facing image to image copy

copy2, copy_with_progress2

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: factor out copy from image create/open/close
Sage Weil [Mon, 8 Oct 2012 20:59:18 +0000 (13:59 -0700)]
librbd: factor out copy from image create/open/close

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: rename get_size() -> get_current_size()
Sage Weil [Mon, 8 Oct 2012 18:19:43 +0000 (11:19 -0700)]
librbd: rename get_size() -> get_current_size()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: trivial unit test
Sage Weil [Mon, 8 Oct 2012 16:52:32 +0000 (09:52 -0700)]
filer: trivial unit test

Perhaps the presence of this file will inspire me and others to write
proper unit tests.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: include buffer_extents in ObjectExtent operator<<
Sage Weil [Mon, 8 Oct 2012 16:51:10 +0000 (09:51 -0700)]
osd: include buffer_extents in ObjectExtent operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: more debug output
Sage Weil [Mon, 8 Oct 2012 16:55:41 +0000 (09:55 -0700)]
filer: more debug output

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: fix add_partial_sparse_result
Sage Weil [Mon, 8 Oct 2012 16:55:17 +0000 (09:55 -0700)]
filer: fix add_partial_sparse_result

Fix advancement of bl_off, and handling of case where bl has no more bytes
to consume.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_librbd_fsx: randomly vary striping on clone
Sage Weil [Sat, 6 Oct 2012 01:01:24 +0000 (18:01 -0700)]
test_librbd_fsx: randomly vary striping on clone

This exercises the io paths that read from the parent for client reads and
for cloning.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: allow striping to be specified for clones
Sage Weil [Sat, 6 Oct 2012 00:59:09 +0000 (17:59 -0700)]
librbd: allow striping to be specified for clones

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: add debug printability for striped read result stuff
Sage Weil [Fri, 5 Oct 2012 22:54:53 +0000 (15:54 -0700)]
filer: add debug printability for striped read result stuff

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: uninline StripedReadResult
Sage Weil [Fri, 5 Oct 2012 20:36:31 +0000 (13:36 -0700)]
filer: uninline StripedReadResult

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: avoid read copy for c++ api read
Sage Weil [Fri, 5 Oct 2012 18:01:05 +0000 (11:01 -0700)]
librbd: avoid read copy for c++ api read

Read directly into the user's bufferlist instead of copying the buffer
contents.

NOTE: this potentially exposes cached buffers to C++ API users.  Document
this!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: read_from_parent into a bufferlist
Sage Weil [Fri, 5 Oct 2012 17:47:13 +0000 (10:47 -0700)]
librbd: read_from_parent into a bufferlist

This avoids a copy.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: use bufferlist target for read_iterate()
Sage Weil [Fri, 5 Oct 2012 16:15:38 +0000 (09:15 -0700)]
librbd: use bufferlist target for read_iterate()

Save ourselves a copy for read_iterate.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: make read methods target buffers or bufferlists
Sage Weil [Fri, 5 Oct 2012 16:14:36 +0000 (09:14 -0700)]
librbd: make read methods target buffers or bufferlists

This will let us transition much of the read code to move bufferlists
around instead of copying data between buffers.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: kill unused get_block_osd()
Sage Weil [Thu, 4 Oct 2012 23:51:19 +0000 (16:51 -0700)]
librbd: kill unused get_block_osd()

Replaced by ImageCtx::get_object_name().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: kill legacy striping helpers
Sage Weil [Wed, 3 Oct 2012 21:19:32 +0000 (14:19 -0700)]
librbd: kill legacy striping helpers

These are replaced by ImageCtx accessors or the use of the Filer striping
helper.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: reimplement flatten in terms of child objects
Sage Weil [Wed, 3 Oct 2012 22:29:50 +0000 (15:29 -0700)]
librbd: reimplement flatten in terms of child objects

Iterate over child *objects*, and map each one to the parent extents it
represents.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: write sync read over an extent list
Sage Weil [Wed, 3 Oct 2012 22:29:27 +0000 (15:29 -0700)]
librbd: write sync read over an extent list

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: make rollback use new striping accessors
Sage Weil [Wed, 3 Oct 2012 22:11:08 +0000 (15:11 -0700)]
librbd: make rollback use new striping accessors

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: make trim_image() behave with new world striping order
Sage Weil [Wed, 3 Oct 2012 22:09:48 +0000 (15:09 -0700)]
librbd: make trim_image() behave with new world striping order

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: generate format_string in ImageCtx
Sage Weil [Thu, 4 Oct 2012 18:04:53 +0000 (11:04 -0700)]
librbd: generate format_string in ImageCtx

Prebuild the format string on image load so that it is handy at all times.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: make read_iterate iterate over periods
Sage Weil [Thu, 4 Oct 2012 00:15:10 +0000 (17:15 -0700)]
librbd: make read_iterate iterate over periods

Object sizes no longer make sense since we are iterating over the logical
device image space, and the striping may make that unrelated to the size
of the individual objects.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd/ImageCtx: accessors
Sage Weil [Wed, 3 Oct 2012 22:09:25 +0000 (15:09 -0700)]
librbd/ImageCtx: accessors

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: reimplement striping
Sage Weil [Thu, 4 Oct 2012 23:53:27 +0000 (16:53 -0700)]
librbd: reimplement striping

This replaces most of the existing striping code with use of the Filer
striping helper methods and a more general ceph_file_layout that can
handle more sophisticated striping patterns that the previous uniform
object approach.

This patch is not fully complete; there are a few additional patches that
follow that clean up some of the support functions.  However, most of the
IO path is covered here.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: add sparse result into a striped read result
Sage Weil [Tue, 2 Oct 2012 23:00:29 +0000 (16:00 -0700)]
filer: add sparse result into a striped read result

Add a helper to assimilate a sparse read result into the destriper
helper class.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofiler: make tail zeroing in stripe result assembly optional
Sage Weil [Tue, 2 Oct 2012 22:37:41 +0000 (15:37 -0700)]
filer: make tail zeroing in stripe result assembly optional

Objecter doesn't want it, librbd will.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: remove callback from handle_sparse_read
Sage Weil [Tue, 2 Oct 2012 22:22:34 +0000 (15:22 -0700)]
librbd: remove callback from handle_sparse_read

We always used simple_read_cb, so put it inline.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoobjecter: use StripedReadResult for scatter/gather read
Sage Weil [Tue, 2 Oct 2012 21:53:24 +0000 (14:53 -0700)]
objecter: use StripedReadResult for scatter/gather read

This vastly simplifies the code, and uses the more generic helper class.

Signed-off-by: Sage Weil <sage@inktank.com>