lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Nov 2019 17:21:46 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Matthew Bobrowski <mbobrowski@...browski.org>, jack@...e.cz,
        tytso@....edu, linux-ext4@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [RFCv3 2/4] ext4: Add ext4_ilock & ext4_iunlock API



On 11/20/19 10:05 PM, Matthew Wilcox wrote:
> On Wed, Nov 20, 2019 at 05:48:30PM +0530, Ritesh Harjani wrote:
>> Not against your suggestion here.
>> But in kernel I do see a preference towards object followed by a verb.
>> At least in vfs I see functions like inode_lock()/unlock().
>>
>> Plus I would not deny that this naming is also inspired from
>> xfs_ilock()/iunlock API names.
> 
> I see those names as being "classical Unix" heritage (eh, maybe SysV).
> 
>> hmm, it was increasing the name of the macro if I do it that way.
>> But that's ok. Is below macro name better?
>>
>> #define EXT4_INODE_IOLOCK_EXCL		(1 << 0)
>> #define EXT4_INODE_IOLOCK_SHARED	(1 << 1)
> 
> In particular, Linux tends to prefer read/write instead of
> shared/exclusive terminology.  rwlocks, rwsems, rcu_read_lock, seqlocks.
> shared/exclusive is used by file locks.  And XFS ;-)
> 
> I agree with Jan; just leave them opencoded.

Sure.

> 
> Probably worth adding inode_lock_downgrade() to fs.h instead of
> accessing i_rwsem directly.
> 

Yup, make sense. but since this series is independent of that change,
let me add that as a separate patch after this series.


Thanks for the review!!
-ritesh

Powered by blists - more mailing lists