__u64 kms;
struct ll_sb_info *sbi;
struct ll_ra_info *ra;
+ unsigned int chunk_bits = 0;
+
ENTRY;
BUILD_BUG_ON(PAGE_SHIFT > 16);
RETURN(0);
}
+ if (io->ci_compressed_io)
+ chunk_bits = io->ci_compr_chunk_bits;
+
spin_lock(&ras->ras_lock);
/**
else
*start_idx = ras->ras_next_readahead_idx;
+ if (chunk_bits) {
+ CDEBUG(D_SEC, "start_idx %lu\n", *start_idx);
+ *start_idx &= ~((COMPR_MIN_PAGES << chunk_bits) - 1);
+ CDEBUG(D_SEC, "start_idx %lu\n", *start_idx);
+ }
+
if (ras->ras_window_pages > 0)
end_idx = ras->ras_window_start_idx + ras->ras_window_pages - 1;
RETURN(0);
}
+ if (chunk_bits) {
+ int chunk_pages = COMPR_MIN_PAGES << chunk_bits;
+ CDEBUG(D_SEC, "end_idx %lu\n", end_idx);
+ if ( end_idx & (chunk_pages - 1)) {
+ end_idx &= ~(chunk_pages - 1);
+ end_idx += chunk_pages;
+ vio->vui_ra_pages &= ~(chunk_pages - 1);
+ vio->vui_ra_pages += chunk_pages;
+ }
+ CDEBUG(D_SEC, "end_idx %lu\n", end_idx);
+ }
+
RAS_CDEBUG(ras);
CDEBUG(D_READA, DFID": ria: %lu/%lu, bead: %lu/%lu, hit: %d\n",
PFID(lu_object_fid(&clob->co_lu)),
local decomp1=$TMP/$tdir/$tfile.dec_$orig_short.$t1$l1$c1
local decomp2=$TMP/$tdir/$tfile.dec_$orig_short.$t1$l1$c1.cp
local decomp3=$TMP/$tdir/$tfile.dec_$orig_short.$t1$l1$c1.32.1.5
+ local decomp4=$TMP/$tdir/$tfile.dec_$orig_short.$t1$l1$c1.32.1.5.orig
$LFS setstripe -E 512K -Z $t1:$l1 -E 768K -Z none -E -1 -Z $t1:$l1 \
--compress-chunk=$c1 $stored_dir ||
diff $orig $decomp2 ||
error "decompression failed"
+ # Reading starting the 480K offset
+ # on compressed/plain data board
+ dd if=$stored of=$decomp3 \
+ bs=32k count=2 skip=15 &>/dev/null ||
+ error "dd to $decomp3 failed"
+
+ dd if=$orig of=$decomp4 \
+ bs=32k count=2 skip=15 &>/dev/null ||
+ error "dd to $decomp4 failed"
+
+ cmp --verbose $decomp3 $decomp4 || error "decompression failed"
+
# Copy file with direct I/O (falls back to buffered I/O)
dd if=$orig of=$stored3 bs=$PAGE_SIZE oflag=direct ||
error "dd to $stored3 failed"