Re: [PATCH] Introduce SEEK_DATA/SEEK_HOLE support to XFS V1

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

 



On Sun, Nov 20, 2011 at 09:59:31PM +0800, Jeff Liu wrote:
> > 		fsb = XFS_B_TO_FSBT(mp, start_offset);
> > 		error = xfs_bmap_first_unused(NULL, ip, 1, &fsb,
> > 						XFS_DATA_FORK);
> > 		if (error)
> > 			return -error;
> > 
> > 		if (fsb <= XFS_B_TO_FSBT(mp, start_offset))
> > 			return start_offset;
> > 		return XFS_FSB_TO_B(mp, fsb);
> 
> Thanks for pointing it out, I even don't know XFS has this convenient routine at that time. :(

I didn't remember it either, but Dave has been working the dir code
which makes use of this funtion lately :)

Btw, the documentation for the function doesn't mention that it starts
searching for the hole only after the passed in block number, which
is something that could be improved.

_______________________________________________
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