linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@redhat.com>
To: "胡 玮文" <huww98@outlook.com>
Cc: "linux-erofs@lists.ozlabs.org" <linux-erofs@lists.ozlabs.org>
Subject: Re: [PATCH 2/2] erofs-utils: refactor: remove end argument from erofs_mapbh
Date: Sat, 2 Jan 2021 17:27:50 +0800	[thread overview]
Message-ID: <20210102092750.GC3732199@xiangao.remote.csb> (raw)
In-Reply-To: <ME3P282MB193853B54A77E4698E4869BEC0D40@ME3P282MB1938.AUSP282.PROD.OUTLOOK.COM>

On Sat, Jan 02, 2021 at 06:00:06AM +0000, 胡 玮文 wrote:
> Hi Xiang,
> 
> If I understand it correctly, when ‘end == false’, the last buffer block will not get its ‘blkaddr’. I can’t see why we need this, but I might be missing something. And every invocation of this function just pass ‘true’ to this argument. I’m intended to remove some dead code which is never invoked.

Yeah, your understanding is correct. The original purpose when 'end == false' was to
return the start blkaddr of a buffer block in case of (or reserve for) later use (e.g.
get the blkaddr of a inode or some data block that will need). and 'end == true' was
to return the tail blkaddr.... But, I think the behavior of 'end == false' was
completely broken at some time...

> 
> > 在 2021年1月2日,13:15,Gao Xiang <hsiangkao@redhat.com> 写道:
> > 
> > Hi Weiwen,
> > 
> >> On Fri, Jan 01, 2021 at 05:11:58PM +0800, 胡玮文 wrote:
> >> Signed-off-by: Hu Weiwen <huww98@outlook.com>
> > 
> > It seems that it drops the needed argument `end'.
> > 
> > The original purpose of that is to get the beginning/end blkaddr of a buffer block
> > in preparation for later use, some specific reasons to get rid of it?
> > (also it only drops one extra line considering the diffstat....)
> 
> That’s because I already assumed ‘end == true’ and rewritten this function in [PATCH 1/2]
> 

Ok, let me seek some time read into it :) the complexity issue of buffer allocation
is a known issue and can be optimized by some caching (Although Android don't have
too many files) :)

Thanks,
Gao Xiang

> Thanks for your reply.
> 
> Hu Weiwen
> 
> > 
> > Thanks,
> > Gao Xiang


      reply	other threads:[~2021-01-02  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210101091158.13896-1-huww98@outlook.com>
2021-01-01  9:11 ` [PATCH 2/2] erofs-utils: refactor: remove end argument from erofs_mapbh 胡玮文
2021-01-02  5:14   ` Gao Xiang
2021-01-02  6:00     ` 胡 玮文
2021-01-02  9:27       ` Gao Xiang [this message]

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=20210102092750.GC3732199@xiangao.remote.csb \
    --to=hsiangkao@redhat.com \
    --cc=huww98@outlook.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 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).