]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code: reduce jerasure verbosity
authorLoic Dachary <loic@dachary.org>
Tue, 27 May 2014 16:34:10 +0000 (18:34 +0200)
committerLoic Dachary <loic@dachary.org>
Mon, 4 Aug 2014 09:41:56 +0000 (11:41 +0200)
Only output a message about adjusting the buffer size when it is
adjusted, not when the size does not need adjustment.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/erasure-code/jerasure/ErasureCodeJerasure.cc

index 8b982ce3dc20604b140c601bd7f6bdd14935d273..e207c3aa612b9f81baf293967cbfc1d0a27074c8 100644 (file)
@@ -122,9 +122,9 @@ int ErasureCodeJerasure::encode(const set<int> &want_to_encode,
 {
   unsigned blocksize = get_chunk_size(in.length());
   unsigned padded_length = blocksize * k;
-  dout(10) << "encode adjusted buffer length from " << in.length()
-          << " to " << padded_length << dendl;
-  assert(padded_length % k == 0);
+  if (in.length() != padded_length) 
+    dout(10) << "encode adjusted buffer length from " << in.length()
+            << " to " << padded_length << dendl;
   bufferlist out(in);
   if (padded_length - in.length() > 0) {
     bufferptr pad(padded_length - in.length());