Re: [PATCH v2] Fix AFFS race condition.

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

 



On 14.05.2012 12:40, Marco Stornelli wrote:

> 2012/5/14 Jan Kara <jack@xxxxxxx>:
>> On Sun 13-05-12 15:44:33, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> AFFS code preallocates several blocks as an optimisation. Unfortunately
>>> it's not protected by lock so the same blocks may end up allocated twice.
>>> Here is a fix.
>>>
>>> Signed-off-by: Vladimir Serbinenko <phcoder@xxxxxxxxx>
>>  The patch looks good to me now. Thanks! You can add:
>> Reviewed-by: Jan Kara <jack@xxxxxxx>
>>
>>  Al, will you merge this patch through your tree? AFFS does not seem to
>> have a maintainer so you are a default fallback...
>>
>>                                                                Honza
>>
> 
> I don't know the AFFS code, so only a question. Instead to use a spin
> lock, I think we can use a simple mutex. Or is the spin lock
> mandatory?

My first version used mutex. But then Jan suggested that since the
critical section is very short and doesn't contain any instructions
which might sleep, it's better for performance to use a spin lock.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux