Re: [PATCH 2/3] btrfs: rename btrfs_block_group::count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 3, 2020 at 12:38 PM Anand Jain <anandsuveer@xxxxxxxxx> wrote:
>
>
> >
> > Why rename at all?
> > It's pretty obvious it's a reference count. Count/counter is not an
> > unusual name to use for a reference count, it even has get and put
> > helpers...
>
> I understand as the member count is in btrfs_block_group so prefix bg_
> looks redundant, but prefix bg_ is still useful. With out the prefix,
> the grep ">count" *.c didn't help straight away to verify where is

Following that logic, we would add the bg_ prefix to most members of
block_group...
It has members named 'start', 'length', 'flags', etc. Those are
generic too, many other structures have members with exactly those
names...

Don't take it wrong, but I don't find it useful at all.

Thanks.

> block_group count used. At two places we missed using the get helper
> which the patch 3/3 fixed.
>
> It's ok to drop this rename patch if you find it's not inline with the
> rest of the codes.



-- 
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux