From: Gao Xiang <xiang@kernel.org>
To: linux-erofs@lists.ozlabs.org, Li Guifu <bluce.liguifu@huawei.com>
Cc: Gao Xiang <xiang@kernel.org>
Subject: [PATCH 2/4] erofs-utils: reserve physical_clusterbits[]
Date: Mon, 10 May 2021 15:23:01 +0800 [thread overview]
Message-ID: <20210510072303.4628-3-xiang@kernel.org> (raw)
In-Reply-To: <20210510072303.4628-1-xiang@kernel.org>
Sync up with kernel commit
54e0b6c873dc ("erofs: reserve physical_clusterbits[]")
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
include/erofs/internal.h | 1 -
lib/zmap.c | 13 -------------
2 files changed, 14 deletions(-)
diff --git a/include/erofs/internal.h b/include/erofs/internal.h
index 1339341a0792..da7be569d8ee 100644
--- a/include/erofs/internal.h
+++ b/include/erofs/internal.h
@@ -164,7 +164,6 @@ struct erofs_inode {
uint16_t z_advise;
uint8_t z_algorithmtype[2];
uint8_t z_logical_clusterbits;
- uint8_t z_physical_clusterbits[2];
};
};
#ifdef WITH_ANDROID
diff --git a/lib/zmap.c b/lib/zmap.c
index e2a54b937b7c..0c5c4f52bbd0 100644
--- a/lib/zmap.c
+++ b/lib/zmap.c
@@ -20,8 +20,6 @@ int z_erofs_fill_inode(struct erofs_inode *vi)
vi->z_algorithmtype[0] = 0;
vi->z_algorithmtype[1] = 0;
vi->z_logical_clusterbits = LOG_BLOCK_SIZE;
- vi->z_physical_clusterbits[0] = vi->z_logical_clusterbits;
- vi->z_physical_clusterbits[1] = vi->z_logical_clusterbits;
vi->flags |= EROFS_I_Z_INITED;
}
@@ -66,17 +64,6 @@ static int z_erofs_fill_inode_lazy(struct erofs_inode *vi)
vi->nid * 1ULL);
return -EFSCORRUPTED;
}
- vi->z_physical_clusterbits[0] = vi->z_logical_clusterbits +
- ((h->h_clusterbits >> 3) & 3);
-
- if (vi->z_physical_clusterbits[0] != LOG_BLOCK_SIZE) {
- erofs_err("unsupported physical clusterbits %u for nid %llu",
- vi->z_physical_clusterbits[0], (unsigned long long)vi->nid);
- return -EOPNOTSUPP;
- }
-
- vi->z_physical_clusterbits[1] = vi->z_logical_clusterbits +
- ((h->h_clusterbits >> 5) & 7);
vi->flags |= EROFS_I_Z_INITED;
return 0;
}
--
2.20.1
next prev parent reply other threads:[~2021-05-10 7:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 7:22 [PATCH 0/4] erofs-utils: prepare for per-(sub)file compression strategies Gao Xiang
2021-05-10 7:23 ` [PATCH 1/4] erofs-utils: compress trailing data for big pcluster properly Gao Xiang
2021-05-10 7:23 ` Gao Xiang [this message]
2021-05-10 7:23 ` [PATCH 3/4] erofs-utils: prepare for per-(sub)file compress strategies Gao Xiang
2021-05-10 7:23 ` [PATCH 4/4] erofs-utils: sync up z_erofs_get_extent_compressedlen() 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=20210510072303.4628-3-xiang@kernel.org \
--to=xiang@kernel.org \
--cc=bluce.liguifu@huawei.com \
--cc=linux-erofs@lists.ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.