Re: [PATCH 4/5] xfs: push the ilock into xfs_zero_eof

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

 



On Tue, Mar 27, 2012 at 12:15:40PM +1100, Dave Chinner wrote:
> > +	xfs_ilock(ip, XFS_ILOCK_EXCL);
> >  	error = xfs_bmapi_read(ip, last_fsb, 1, &imap, &nimaps, 0);
> > +	xfs_iunlock(ip, XFS_ILOCK_EXCL);
> 
> Does that even need to be an exclusive lock? a shared lock is all
> that is needed to do a lookup, and this is just a lookup...

It has to be a xfs_ilock_map_shared - but given that we hold the iolock
exclusive anyway I didn't bother to optimize this further.

Same for the second xfs_bmapi_read call.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux