xfs
[Top] [All Lists]

Re: XFS code questions

To: Craig Tierney <ctierney@xxxxxxxx>
Subject: Re: XFS code questions
From: Nathan Scott <nathans@xxxxxxx>
Date: Tue, 11 May 2004 09:33:49 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1084229000.2990.14.camel@hpti9.fsl.noaa.gov>; from ctierney@HPTI.com on Mon, May 10, 2004 at 04:43:20PM -0600
References: <1084229000.2990.14.camel@hpti9.fsl.noaa.gov>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
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


<Prev in Thread] Current Thread [Next in Thread>