| To: | Michael Nishimoto <miken@xxxxxxxxx> |
|---|---|
| Subject: | Re: question about xfs_alloc_fix_freelist() |
| From: | David Chinner <dgc@xxxxxxx> |
| Date: | Mon, 5 May 2008 09:50:48 +1000 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <038C959C13632143B902BE360CA5B58E3C552E@mx1.ddns.agami.com> |
| References: | <038C959C13632143B902BE360CA5B58E3C552E@mx1.ddns.agami.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.2.1i |
On Fri, May 02, 2008 at 02:01:47PM -0700, Michael Nishimoto wrote:
>
> The following code can be found near the end of xfs_alloc_fix_freelist:
>
> if (targs.agbno == NULLAGBLOCK) {
> if (flags & XFS_ALLOC_FLAG_FREEING)
> break;
> xfs_trans_brelse(tp, agflbp);
> args->agbp = NULL;
> return 0;
> }
>
> Don't we need to release agbp too by calling xfs_trans_brelse(tp, agbp)?
I don't think so. AFAICT, The agbp (agf block) is linked into the
transaction and by this point we may have modified the AGF (think
multiple iterations of the loop to fill the free list). Given that
it may be modified, we shouldn't release it here but instead allow
the transaction commit/abort to do that for us at the appropriate
time.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | zrhsitfr@sohu.com诚邀合作!, 万sohu.com |
|---|---|
| Next by Date: | [PATCH] Replace down_trylock() with down_try(), reverse return values., Rusty Russell |
| Previous by Thread: | question about xfs_alloc_fix_freelist(), Michael Nishimoto |
| Next by Thread: | Re: question about xfs_alloc_fix_freelist(), Michael Nishimoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |