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  linux-cve-announce  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]
Message-ID: <4AB08744.1020102@primeinteractive.net>
Date:	Wed, 16 Sep 2009 08:35:48 +0200
From:	Pavol Cvengros <pavol.cvengros@...meinteractive.net>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
CC:	Jan Kara <jack@...e.cz>, Justin Maggard <jmaggard10@...il.com>,
	Eric Sandeen <sandeen@...hat.com>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	linux-ext4@...r.kernel.org
Subject: Re: ext4+quota+nfs issue

On 9/14/2009 8:52 PM, Aneesh Kumar K.V wrote:
> On Mon, Sep 14, 2009 at 07:50:56PM +0200, Jan Kara wrote:
>    
>>    I've found some time to look into this and I can see a few problems in
>> the code. Firstly, what may cause your problems:
>>    vfs_dq_claim_blocks() is called in ext4_mb_mark_diskspace_used(). But
>> as far as I can understand the code, ext4_mb_normalize_request() can
>> increase the amount of space we really allocate and thus we try to
>> allocate more blocks than we have actually reserved in quota. Aneesh, is
>> that right?
>>      
> ext4_mb_mark_diskspace_used use ac->ac_b_ex.fe_len which is NOT the normalized
> request len. it is min(allocated_len, original_len). So i guess that code
> should be safe
>
>
>    
>>    Secondly, ext4_da_reserve_space() seems to have a bug that it can reserve
>> quota blocks multiple times if ext4_claim_free_blocks() fail and we retry
>> the allocation. We should release the quota reservation before restarting.
>> Actually, when we find out we cannot reserve quota space, we could force
>> some delayed allocated writes to disk (thus possibly release some quota
>> in case we have overestimated the amount of blocks needed). But that's
>> a different issue.
>>      
> That would imply the file system was full. But the dumpe2fs ouput list
> large number of free blocks. But yes the code should have released the
> quota reservation before trying block reservation again.
>
>
>    

file system is fresh but unfortunately already used and I can't 
"re-format" it. Is there a way around this? I think that FS was created 
by "mkfs.ext4 -j /dev....."

>>    Thirdly, ext4_indirect_calc_metadata_amount() is wrong for sparse files.
>> The worst case is 3 metadata blocks per data block if we make the file
>> sufficiently sparse and there's no easy way around that...
>>
>>      
> -aneesh
>    

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ