Remove all existing usage, but leave the definition so third-party
class plugins don't break.
The public flag let *any* user execute a class method, as long
as they had read and/or write access as the method required. This is
better managed by the new osd caps infrastructure, and it was
entirely undocumented and unused, so it should be safe to remove.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
These are useful for rbd layering, since reading an rbd image
requires read-only class methods.
Fixes: #3167
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
I couldn't find a way to do this with skip parsers,
so these are explicitly included in the grammar.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
When moving directory between snaprealms, we can avoid creating snaprealm
if the directory doesn't has its own snaprealm and directory was created
after both realms' newest snapshot.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
We can avoid save parent snaprealm if current_parent_since is greater
than parent snaprealm's newest sequence.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Xlock imports and capability imports are uncorrelated, we should call
xlock_import() even there is no capability import.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Client::insert_trace() was handling readdir and lssnap replies
assuming that the directory inode was not null. This commit
checks that the directory inode (returned as part of the trace)
is not null, and invokes insert_readdir_results() for the readdir
and lssnap replies.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
CID 716860: Unchecked return value (CHECKED_RETURN)
At (22): Calling function "ioctl(int, unsigned long, ...)" without checking return value (as is done elsewhere 30 out of 31 times).
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717076: Resource leak (RESOURCE_LEAK)At (26): Variable "newContents" going
out of scope leaks the storage it points to.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 728419: Copy-paste error (COPY_PASTE_ERROR)At (2): "srcoff" in "actual !=
(int64_t)srcoff" looks like a copy-paste error. Should it say "dstoff" instead?
Signed-off-by: Samuel Just <sam.just@inktank.com>
This is necessary to avoid matching things like "allow r poolfoo".
It's also needed to distinguish "allow r class-read" from
"allow r class -read".
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 716862: Other violation (CHECKED_RETURN)
At (3): Calling function "lseek64(to, dstoff, 0)" without checking return value. This library function may fail and return an error code.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 716860: Unchecked return value (CHECKED_RETURN)
At (27): Calling function "ioctl(int, unsigned long, ...)" without checking return value (as is done elsewhere 29 out of 31 times).
Signed-off-by: Sage Weil <sage@inktank.com>
CID 716858: Other violation (CHECKED_RETURN)
At (6): Calling function "lseek64(this->fd, pos, 0)" without checking return value. This library function may fail and return an error code.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717046: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter i of type entity_inst_t (size 152 bytes) by value.
CID 717047: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter i of type entity_inst_t (size 152 bytes) by value.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 716881: Copy-paste error (COPY_PASTE_ERROR)
At (2): "full_ratio" in "inc.full_ratio" looks like a copy-paste error. Should it say "nearfull_ratio" instead?
Signed-off-by: Sage Weil <sage@inktank.com>