search for: i_blocksize

Displaying 7 results from an estimated 7 matches for "i_blocksize".

Did you mean: s_blocksize
2023 Mar 09
5
[PATCH v2 1/5] fs: add i_blockmask()
...age from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. ---------------------------------------------------------------------- Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c8591...
2023 Mar 09
8
[PATCH v3 1/6] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v3: -none v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h i...
2023 Mar 10
3
[PATCH v3 2/6] erofs: convert to use i_blockmask()
On Thu, Mar 09, 2023 at 11:21:23PM +0800, Yangtao Li wrote: > Use i_blockmask() to simplify code. Umm... What's the branchpoint for that series? Not the mainline - there we have i_blocksize() open-coded... > Signed-off-by: Yangtao Li <frank.li at vivo.com> > --- > v3: > -none > v2: > -convert to i_blockmask() > fs/erofs/data.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/erofs/data.c b/fs/erofs/data.c > index 7e8...
2023 Mar 10
5
[PATCH v4 1/5] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/...
2023 Mar 10
1
[PATCH v3 2/6] erofs: convert to use i_blockmask()
Hi Al, On 2023/3/10 11:15, Al Viro wrote: > On Thu, Mar 09, 2023 at 11:21:23PM +0800, Yangtao Li wrote: >> Use i_blockmask() to simplify code. > > Umm... What's the branchpoint for that series? Not the mainline - > there we have i_blocksize() open-coded... Actually Yue Hu sent out a clean-up patch and I applied to -next for almost a week and will be upstreamed for 6.3-rc2: https://lore.kernel.org/r/a238dca1-256f-ae2f-4a33-e54861fe4ffb at kernel.org/T/#t And then Yangtao would like to wrap this as a new VFS helper, I'm not sure...
2023 Mar 10
1
[PATCH v3 4/6] ext4: convert to use i_blockmask()
...ndex d251d705c276..eec36520e5e9 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -2218,7 +2218,7 @@ static int mpage_process_page_bufs(struct mpage_da_data *mpd, > { > struct inode *inode = mpd->inode; > int err; > - ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize(inode) - 1) > + ext4_lblk_t blocks = (i_size_read(inode) + i_blockmask(inode)) > >> inode->i_blkbits; Umm... That actually asks for DIV_ROUND_UP(i_size_read_inode(), i_blocksize(inode)) - compiler should bloody well be able to figure out that division by (1 << n) is s...
2023 Mar 10
1
erofs: convert to use i_blockmask()
On Fri, Mar 10, 2023 at 11:51:21AM +0800, Yangtao Li wrote: > Hi AI, > > > Umm... What's the branchpoint for that series? > > Not the mainline - there we have i_blocksize() open-coded... > > Sorry, I'm based on the latest branch of the erofs repository. > > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git/log/?h=dev-test > > I think I can resend based on mainline. > > > Umm... That actually asks for DIV_ROUND_UP(i_s...