From: Gao Xiang <gaoxiang25@huawei.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<devel@driverdev.osuosl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
<linux-erofs@lists.ozlabs.org>, "Chao Yu" <yuchao0@huawei.com>,
Miao Xie <miaoxie@huawei.com>, <weidu.du@huawei.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Gao Xiang <gaoxiang25@huawei.com>
Subject: [PATCH v2 4/8] staging: erofs: fix a bug when appling cache strategy
Date: Tue, 18 Sep 2018 22:25:36 +0800 [thread overview]
Message-ID: <1537280740-122019-5-git-send-email-gaoxiang25@huawei.com> (raw)
In-Reply-To: <1537280740-122019-1-git-send-email-gaoxiang25@huawei.com>
As described in Kconfig, the last compressed pack should be cached
for further reading for either `EROFS_FS_ZIP_CACHE_UNIPOLAR' or
`EROFS_FS_ZIP_CACHE_BIPOLAR' by design.
However, there is a bug in z_erofs_do_read_page, it will
switch `initial' to `false' at the very beginning before it decides
to cache the last compressed pack.
caching strategy should work properly after appling this patch.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
drivers/staging/erofs/unzip_vle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 94c35b8..3296538 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -629,7 +629,7 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe,
/* go ahead the next map_blocks */
debugln("%s: [out-of-range] pos %llu", __func__, offset + cur);
- if (!z_erofs_vle_work_iter_end(builder))
+ if (z_erofs_vle_work_iter_end(builder))
fe->initial = false;
map->m_la = offset + cur;
--
1.9.1
next prev parent reply other threads:[~2018-09-18 14:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 14:25 [PATCH v2 0/8] staging: erofs: error handing and more tracepoints Gao Xiang
2018-09-18 14:25 ` [PATCH v2 1/8] staging: erofs: fix a missing endian conversion Gao Xiang
2018-09-18 14:25 ` [PATCH v2 2/8] staging: erofs: clean up z_erofs_map_blocks_iter Gao Xiang
2018-09-18 14:25 ` [PATCH v2 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter Gao Xiang
2018-09-18 14:25 ` Gao Xiang [this message]
2018-09-18 14:27 ` [PATCH v2 5/8] staging: erofs: complete error handing of z_erofs_do_read_page Gao Xiang
2018-09-18 14:27 ` [PATCH v2 6/8] staging: erofs: avoid magic constants when initializing clusterbits Gao Xiang
2018-09-18 14:27 ` [PATCH v2 7/8] staging: erofs: add trace points for reading zipped data Gao Xiang
2018-09-18 14:27 ` [PATCH v2 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c Gao Xiang
2018-09-18 14:36 ` [PATCH v2 0/8] staging: erofs: error handing and more tracepoints Greg Kroah-Hartman
2018-09-18 14:38 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1537280740-122019-5-git-send-email-gaoxiang25@huawei.com \
--to=gaoxiang25@huawei.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=weidu.du@huawei.com \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®