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]
Date:	Wed, 12 Mar 2008 14:38:11 +0530
From:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To:	Andreas Dilger <adilger@....com>
Cc:	Jan Kara <jack@...e.cz>, Mingming Cao <cmm@...ibm.com>,
	tytso@....edu, sandeen@...hat.com, linux-ext4@...r.kernel.org
Subject: Re: [RFC PATCH] ext4: Fix the locking with respect to ext3 to ext4
	migrate.

On Wed, Mar 12, 2008 at 02:56:29AM -0600, Andreas Dilger wrote:
> On Mar 11, 2008  22:28 +0530, Aneesh Kumar K.V wrote:
> > On Tue, Mar 11, 2008 at 04:25:37PM +0100, Jan Kara wrote:
> > >   I agree here. IMHO the better option would be to just build the
> > > extent-tree for converted inode on best-effort basis. If we find in
> > > the end that someone has allocated new block to the file (via mmap
> > > filling a hole) while we are converting, we can just cancel the
> > > conversion. Because I think the cost of extra rwsem (both in terms of
> > > additional memory needed for each inode structure and in time needed for
> > > rwsem acquisitions) is more than I as a user would like to bear given
> > > how rare the conversion is.
> >
> > Something like the below ??
> >
> >  	down_write(&EXT4_I(inode)->i_data_sem);
> > +	/* check for number of blocks */
> > +	if (total_blocks  != inode->i_blocks) {
> > +		retval = -EAGAIN;
> > +		up_write(&EXT4_I(inode)->i_data_sem);
> > +		goto err_out;
> 
> Is this enough, or should we use the inode version instead

We are already holding inode->i_mutex. So the only possible operation is
adding new blocks via mmap write to holes. Also inode version is tricky
because it is available only with i_version mount option. We are also
interested only in new blocks added event.


-aneesh
--
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