mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
Merge pull request #2539 from ceph/wip-9529
Wip 9529 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
7f1d9e8ab6
@ -78,9 +78,11 @@ namespace ceph {
|
||||
assert(s == SECSuccess);
|
||||
}
|
||||
void Update (const byte *input, size_t length) {
|
||||
SECStatus s;
|
||||
s = PK11_DigestOp(ctx, input, length);
|
||||
assert(s == SECSuccess);
|
||||
if (length) {
|
||||
SECStatus s;
|
||||
s = PK11_DigestOp(ctx, input, length);
|
||||
assert(s == SECSuccess);
|
||||
}
|
||||
}
|
||||
void Final (byte *digest) {
|
||||
SECStatus s;
|
||||
|
@ -1084,11 +1084,11 @@ int RGWPutObjProcessor_Atomic::handle_data(bufferlist& bl, off_t ofs, MD5 *hash,
|
||||
bool exclusive = (!write_ofs && immutable_head()); /* immutable head object, need to verify nothing exists there
|
||||
we could be racing with another upload, to the same
|
||||
object and cleanup can be messy */
|
||||
if (hash) {
|
||||
hash->Update((const byte *)bl.c_str(), bl.length());
|
||||
}
|
||||
int ret = write_data(bl, write_ofs, phandle, exclusive);
|
||||
if (ret >= 0) { /* we might return, need to clear bl as it was already sent */
|
||||
if (hash) {
|
||||
hash->Update((const byte *)bl.c_str(), bl.length());
|
||||
}
|
||||
bl.clear();
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user