hi Craig,
On Mon, May 10, 2004 at 04:43:20PM -0600, Craig Tierney wrote:
> I have a few questions about the xfs code. Line
> numbers are relative to the 2.4.26 kernel.
>
> 1) In xfs_lrw.c in xfs_iozero at line 179, a page is allocated
> by grab_cache_page. Does grab_cache_page guarantee
> that the page is lockable AND that grab_cache_page
> does the locking?
grab_cache_page returns a locked page, or NULL.
> 2) In xfs_aops.c, the function xfs_count_page_state checks
> the page for it's state (delayed alloc, unmapped, unwritten).
> Why does it to a do while to figure it out? Why can't it
> just check once? Is it check incase there are mulitple
> buffers in one page?
Yep, this is to support filesystem blocksizes smaller than
the page size.
> 3) Should the setting of flags with PFLAGS (ex. line
> 1300 in xfs_aops.c) be done atomically?
Process flags aren't set there, that'll be testing whether
or not they are set. Doesn't need to use atomic interfaces,
no. Those two process flags are set/cleared in the VM and
inside the XFS transaction manager code.
HTH.
cheers.
--
Nathan
|