We were previously only looking at the epoch the op was sent in, which meant
that if we had dropped responsibility somewhere between send_epoch and our
current epoch, we would queue up the op until a new osdmap came along. If it
never did, we could block all client IO against us...
Fixes: #8338
Signed-off-by: Greg Farnum <greg@inktank.com>
Even if all snaps for the clone have been removed, we still have to
send the delete to ensure that when the object is recreated the
new snaps aren't included in the wrong clone.
Signed-off-by: Samuel Just <sam.just@inktank.com>
We were passing the causative MDS (as an int), but pushing down the
actual Message will help us as we set up an OpTracker.
Signed-off-by: Greg Farnum <greg@inktank.com>
On Debian this fixes FTBFS when gcj-jdk and openjdk-7-jdk are installed at
the same time because build system will use default `javac` executable
provided by current JDK through `update-alternatives` instead of blindly
calling GCJ when it is present.
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
This should not affect OpenJDK which understands '-classpath' as well.
With gcj-jdk we still get FTBFS later:
~~~~
java/native/libcephfs_jni.cc:2878:55: error: invalid conversion from 'const jbyte* {aka const signed char*}' to 'jbyte* {aka signed char*}' [-fpermissive]
reinterpret_cast<const jbyte*>(rawAddress));
^
In file included from java/native/libcephfs_jni.cc:27:0:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/jni.h:1471:8: error: initializing argument 4 of 'void _Jv_JNIEnv::SetByteArrayRegion(jbyteArray, jsize, jsize, jbyte*)' [-fpermissive]
void SetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3)
^
make[5] *** [java/native/libcephfs_jni_la-libcephfs_jni.lo] Error 1
~~~~
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
The client that tries reconnect may have dirty caps and unsafe requests.
Allowing the reconnect attempt may compromise consistency.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Revert commit 40d56a97 (mds: optimize EMetaBlob::fullbit, remotebit,
nullbit encoding). This optimization creates small segments in the
result bufferlist of encoding EMetaBlob. Perf shows lots of CPU time
are used for allocating list node for bufferlist.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
CInode::encode_inodestat() should clear the 'new' flag of client
cap even when session is stale, because the 'new' flag prevents
Locker::issue_caps() from sending cap message to client.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Don't check for 'fd' but for the return value of the ::unlinkat() call.
Fix for:
[src/os/BtrfsFileStoreBackend.cc:72] -> [src/os/BtrfsFileStoreBackend.cc:74]:
(warning) Opposite conditions in nested 'if' blocks lead to a dead code block.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/rgw/rgw_user.cc:778]: (style) Variable 'subuser' is
assigned a value that is never used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Remove dead assignment and unsued variable 'secret_key'. Check
op_state.get_access_key() directly for emptiness without extra
variable. Fix comment above check for access key.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/rgw/rgw_main.cc:1086]: (style) Variable 'frontend_frameworks'
is assigned a value that is never used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/rgw/rgw_main.cc:1086]: (style) Variable 'frontend_frameworks' is
assigned a value that is never used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Remove some since long time unused code and variables (commented out
since 2009).
Fix for:
[src/mds/MDBalancer.cc:757]: (style) Variable 'total_sent' is
assigned a value that is never used.
[src/mds/MDBalancer.cc:665]: (style) Variable 'total_goal' is
assigned a value that is never used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/client/SyntheticClient.cc:1143]: (style) Expression is always
false because 'else if' condition matches previous condition at line 1139.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/test/cls_rbd/test_cls_rbd.cc:82]: (error) Mismatching allocation
and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:95]: (error) Mismatching allocation
and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:97]: (error) Mismatching allocation
and deallocation: b
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>