From: Gao Xiang via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: linux-erofs@lists.ozlabs.org
Cc: Zhang Shiming <zhangshiming@oppo.com>, Guo Weichao <guoweichao@oppo.com>
Subject: [WIP] [PATCH 06/12] erofs-utils: fuse: drop ofs_out
Date: Sat, 17 Oct 2020 13:16:15 +0800 [thread overview]
Message-ID: <20201017051621.7810-7-hsiangkao@aol.com> (raw)
In-Reply-To: <20201017051621.7810-1-hsiangkao@aol.com>
[ let's fold in to the original patch. ]
Cc: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
---
fuse/decompress.c | 7 +++----
fuse/decompress.h | 2 +-
fuse/read.c | 3 +--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fuse/decompress.c b/fuse/decompress.c
index e2df3cea78f7..4b7cf3211319 100644
--- a/fuse/decompress.c
+++ b/fuse/decompress.c
@@ -15,7 +15,7 @@
static int z_erofs_shifted_transform(struct z_erofs_decompress_req *rq)
{
- char *dest = rq->out + rq->ofs_out;
+ char *dest = rq->out;
char *src = rq->in + rq->ofs_head;
memcpy(dest, src, rq->outputsize - rq->ofs_head);
@@ -26,7 +26,7 @@ static int z_erofs_shifted_transform(struct z_erofs_decompress_req *rq)
static int z_erofs_decompress_generic(struct z_erofs_decompress_req *rq)
{
int ret = 0;
- char *dest = rq->out + rq->ofs_out;
+ char *dest = rq->out;
char *src = rq->in;
char *buff = NULL;
bool support_0padding = false;
@@ -66,8 +66,7 @@ static int z_erofs_decompress_generic(struct z_erofs_decompress_req *rq)
if (rq->ofs_head) {
src = dest + rq->ofs_head;
- dest = rq->out + rq->ofs_out;
- memcpy(dest, src, rq->outputsize - rq->ofs_head);
+ memcpy(rq->out, src, rq->outputsize - rq->ofs_head);
}
out:
diff --git a/fuse/decompress.h b/fuse/decompress.h
index cd395c3d6b3f..5a3e2356dc1b 100644
--- a/fuse/decompress.h
+++ b/fuse/decompress.h
@@ -17,7 +17,7 @@ enum {
struct z_erofs_decompress_req {
char *in, *out;
- size_t ofs_out, ofs_head;
+ size_t ofs_head;
unsigned int inputsize, outputsize;
/* indicate the algorithm will be used for decompression */
diff --git a/fuse/read.c b/fuse/read.c
index 3f2e49c390de..06ca08587e7c 100644
--- a/fuse/read.c
+++ b/fuse/read.c
@@ -135,8 +135,7 @@ size_t erofs_read_data_compression(struct erofs_vnode *vnode, char *buffer,
ret = z_erofs_decompress(&(struct z_erofs_decompress_req) {
.in = raw,
- .out = buffer,
- .ofs_out = sum,
+ .out = buffer + sum,
.ofs_head = ofs,
.inputsize = EROFS_BLKSIZ,
.outputsize = count,
--
2.24.0
next prev parent reply other threads:[~2020-10-17 5:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201017051621.7810-1-hsiangkao.ref@aol.com>
2020-10-17 5:16 ` [WIP] [PATCH 00/12] erofs-utils: introduce fuse implementation Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 01/12] " Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 02/12] erofs-utils: fuse: support read special file Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 03/12] erofs-utils: fuse: support read compressed file Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 04/12] erofs-utils: fuse: adjust larger extent handling Gao Xiang via Linux-erofs
2020-10-19 3:13 ` 回复: " huangjianan
2020-10-19 3:32 ` Gao Xiang via Linux-erofs
2020-10-19 4:49 ` 回复: " Huang Jianan
2020-10-19 3:37 ` 回复: " Huang Jianan
2020-10-19 3:43 ` Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 05/12] erofs-utils: fuse: use proper expression about inode size Gao Xiang via Linux-erofs
2020-10-17 5:16 ` Gao Xiang via Linux-erofs [this message]
2020-10-17 5:16 ` [WIP] [PATCH 07/12] erofs-utils: fuse: refuse a undefined shifted cluster behavior Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 08/12] erofs-utils: fuse: drop z_erofs_shifted_transform() Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 09/12] erofs-utils: fuse: rename ofs_head and outputsize Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 10/12] erofs-utils: fuse: cleanup erofs_read_data_compression() Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 11/12] erofs-utils: fuse: move up mpage in struct erofs_map_blocks Gao Xiang via Linux-erofs
2020-10-17 5:16 ` [WIP] [PATCH 12/12] erofs-utils: fuse: fix up source headers Gao Xiang via Linux-erofs
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=20201017051621.7810-7-hsiangkao@aol.com \
--to=linux-erofs@lists.ozlabs.org \
--cc=guoweichao@oppo.com \
--cc=hsiangkao@aol.com \
--cc=zhangshiming@oppo.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;
as well as URLs for NNTP newsgroup(s).