Skip to content

Commit

Permalink
compressor: building error for QAT decompress
Browse files Browse the repository at this point in the history
The parameter of decompress changes from 'bufferlist::iterator' to
'bufferlist::const_iterator', but chis change miss class QatAccel,
and so the building could not be successful for QAT environment.

This patch fix this error with '-DWITH_QATZIP=ON'.

Signed-off-by: Qiaowei Ren <[email protected]>
  • Loading branch information
qwren committed Jun 19, 2018
1 parent 33c773a commit 3fedae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/compressor/QatAccel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ int QatAccel::compress(const bufferlist &in, bufferlist &out) {
}

int QatAccel::decompress(const bufferlist &in, bufferlist &out) {
bufferlist::iterator i = const_cast<bufferlist&>(in).begin();
auto i = in.begin();
return decompress(i, in.length(), out);
}

int QatAccel::decompress(bufferlist::iterator &p,
int QatAccel::decompress(bufferlist::const_iterator &p,
size_t compressed_len,
bufferlist &dst) {
unsigned int ratio_idx = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/compressor/QatAccel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class QatAccel {

int compress(const bufferlist &in, bufferlist &out);
int decompress(const bufferlist &in, bufferlist &out);
int decompress(bufferlist::iterator &p, size_t compressed_len, bufferlist &dst);
int decompress(bufferlist::const_iterator &p, size_t compressed_len, bufferlist &dst);
};

#endif

0 comments on commit 3fedae5

Please sign in to comment.