Document the rbd showmapped cmd in rbd.usage(), and rbd's man page,
and add it to the bash completion script.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Bug #1530
This should fix the following race:
1) osd->generate_backlog does pg->assemble_backlog
2) osd->generate_backlog drops the pg lock to grab the osd_map read lock
3) ...which is held by osd->handle_osd_map
4) at the end of osd->handle_osd_map, we call write_info on the pg since
it has progressed to a new peering interval
5) osd->generate_backlog gets the read_lock and the pg lock and promptly
bails since the backlog generation has been cancelled
6) osd dies, but not before the write_info transaction is durable
The result of this is that the in-memory backlog generated in
assemble_backlog doesn't make it to disk, but the updated info does
resulting in an ondisklog inconsistent with the pg info on osd
restart.
This should prevent the info from being written without the log.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Using sync_file_range means that neither any required metadata gets commited,
nor the disk cache gets flushed. Stop using it for the journal, and add
a comment on why a fsync_range system call would be helpful here.
Btw, why does the code use O_SYNC (and not even O_DSYNC!) if using direct
I/O, but fdatasync/fsync for buffered I/O? Avoiding cache flushes and
metadata updates for every writes is just as important for direct I/O
as it is for buffered I/O.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Otherwise it doesn't seem to play nicely with teuthology/sepia
due to requiring the host to have gtest installed.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
It's made difficult by having to go through libcephfs, but it's better
than nothing and should catch most of the errors which were detected
while using it in Hadoop.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
The variable fs_default_name is effectively unused
and the same affect is achieved by treating paths
in a standard way (they contain the scheme:/).
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The working directory should be set in initialize() and
is expected by the unit tests to be fully qualified (i.e.
with ceph://...).
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The routine cannot be fully removed yet because it
still exists as an abstract function in FileSystem class.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Uses the suggested getFileStatus() method for
replacing the deprecated isDirectory(). This is
only marginally slower as get_replication is called
to fill in the FileStatus. If performance ever became
an issue for the paths that use isDirectory() then
getFileStatus can be made faster by pushing more down
into JNI.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The initialization check is removed because
it is part of Hadoop's treatment of file systems
that initialize() is called prior to any other
file system routines. This makes the code cleaner
but in the future verison of libcephfs-java, internal
initialization checks should still be made.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
1. Simplifies the handling of paths by allowing them to be passed
around and manipulated in their fully qualified form. Before
paths are passed into native Ceph calls the path-only portion
is extracted.
2. Sets the initial working directory to be the default home
directory for a user (e.g. /user/<username>/).
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Make CephFileSystem tell Hadoop that the owner
of all files is the current user. This provides
zero security or isolation, but allows Hadoop
to be used with its default security settings.
A future solution will need to be developed that
provides some isolation, and gives a better user
experience.
This fixes tracker issue #1663
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Replace ceph.debug(msg, level) with LOG.level(msg)
provided by the log4j facility used by Hadoop. The
level can now be provided on a class-by-class basis
by modifying conf/log4j.properties.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Previously, there would be an assert failure in _scan_list if we see an
object deleted and then recreated.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>