From 1889e2b42917a996cef6958ee3880344028d9d9a Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Tue, 5 Dec 2017 11:03:42 +0530 Subject: cluster/ec: Fix bugs in stripe-cache feature 1 - This patch fixes a bug in ec_update_stripe() that prevented some stripes to be updated after a write. 2 - This patch also include code modification for the case in which a file does not exist and we write on unaligned offset and user size, the last stripe on which "end" will fall should also be cached. Change-Id: I069cb4be1c8d59c206e3b35a6991e1fbdbc9b474 BUG: 1520758 Signed-off-by: Ashish Pandey --- xlators/cluster/ec/src/ec-inode-write.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/ec/src/ec-inode-write.c') diff --git a/xlators/cluster/ec/src/ec-inode-write.c b/xlators/cluster/ec/src/ec-inode-write.c index afdb50c826e..bf45a867971 100644 --- a/xlators/cluster/ec/src/ec-inode-write.c +++ b/xlators/cluster/ec/src/ec-inode-write.c @@ -2094,6 +2094,9 @@ void ec_writev_start(ec_fop_data_t *fop) } } else { memset(fop->vector[0].iov_base + fop->size - tail, 0, tail); + if (ec->stripe_cache) { + ec_add_stripe_in_cache (ec, fop); + } } } -- cgit