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: <20080821014407.GS3392@webber.adilger.int>
Date:	Wed, 20 Aug 2008 19:44:07 -0600
From:	Andreas Dilger <adilger@....com>
To:	Mingming Cao <cmm@...ibm.com>
Cc:	Theodore Tso <tytso@....edu>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: ENOSPC returned during writepages

On Aug 20, 2008  16:58 -0700, Mingming Cao wrote:
> > Also, if you are doing this by changing the aops on the inode, isn't
> > it possible that a large write starts outside the EXT4_MIN_FREE_BLOCKS
> > boundary and then still runs out of space without changing the aops?
> 
> > Instead it is maybe better to do the check at the start of
> > ext4_da_write_begin() and if it fails then call the non-delalloc
> > write_begin from there?
> 
> Yeah that's better.
> 
> But I realize  a problem. Actually now I think we can't fall back to
> nondelalloc mode if the inode has any dirty pages in the page cache, as
> those pages need delalloc aops ->ext4_da_writepages() to handle delayed
> allocation writeout..

That is only if you are changing the aops, which I already don't think
is a good idea.  Instead, as I suggest there should be a check in the
ext4_da_write_begin() that makes the decision to delay the allocation
or to actually do it, based on the current free blocks.

Instead of doing this check repeatedly (if we think it is expensive, maybe
it isn't), it might make sense to set a superblock flag that indicates
"no more delalloc, too close to ENOSPC" and this is cleared when blocks
are freed beyond the low watermark.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ