If a loop exists in directories due to a symlink: /a/b/c -> /a
We now return -ELOOP from path_walk() instead of looping forever.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Additions to Sage's commits that replace the path walked so
far with the symlinked directory path, rather than the remainder
of the path to walk. This allows the dir symlink tests to
succeed.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
The DirSyms test checks verifies that the new path_walk()
handling code properly walks through symlinked directories
even if the followsym flag is false.
The LoopSyms test checks that we correctly handle symlink
loops, where /a/b/c points back to /a.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
If we are walking /a/b/c and a or b is a symlink, follow it. It's only
c that we don't follow when !followsym.
Signed-off-by: Sage Weil <sage@inktank.com>
Symlinks that have an absolute path are not getting
properly dereferenced in path_walk() due to a bug
with the cur and next inode pointers, and because
the path position wasn't getting reset on the symlink
dereference.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
This adds a "-c <count>" option to the run_xfstests.sh script so
the full set of tests can be repeated more than once without having
to go through the setup process each time.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
If the given device is already mounted at the target location, do not
mount --move it again and create a bunch of dup entries in the /etc/mtab
and kernel mount table.
Signed-off-by: Sage Weil <sage@inktank.com>
Previously the snap_trimmer would continuously requeue itself until the
end of scrub. This degrades performance and fills up logs for No Good
Reason.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
Previously the snap_trimmer would continuously requeue itself until the
end of scrub. This degrades performance and fills up logs for No Good
Reason.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
This prevents the relatively long process of queueing
finishers from preventing op submission.
In submit_entry, we no longer check for full before placing
the write in the writeq, committed_thru should work anyway,
and we don't want to grab the required lock.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Previously, we tended to dump a lot of log output under
the Throttle lock. The log level for most log statements
has been reduced to 10.
Additionally, count and max are now atomic_t and can be
read without the Throttle lock.
Finally, most of the perf counter manipulations have been
moved outside of the lock.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Neither caller of queue_op can race.
1) in queue_transactions, already under submit lock
2) in _journaled_ahead, journal finisher is single threaded
Signed-off-by: Samuel Just <sam.just@inktank.com>
syncing the filestore requires a stable commit point (i.e., all ops
up to applied_seq must have been applied). Previously, we used
journal_lock to atomically block new applies while waiting for
the remaining ones to finish. This creates unnecessary contention.
We now use apply_manager to manage that state atomically with its
own lock.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Previously, we ensured op ordering by queueing for journal and
the op queue under the journal lock. All that is required is
that obtaining an op sequence, queueing for journal, and
(for parallel) queueing for application to the fs are done
atomically. To that end, submit_manager now handles op submission.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Previously, data_align began at 0 and remained that way if no
transaction contained a large data segment. This 0 was propagated
to prepare_single_write, which padded out most of a page to ensure
that the bl started with 0 alignment. Passing -1 will ensure that
we don't prepad these small segments.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Precreates objects and does writes to random offsets within
random objects.
Includes rados, filestore, and vanilla fs variants
Signed-off-by: Samuel Just <sam.just@inktank.com>