| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 7/7] xfs: merge xfs_ialloc_ag_select into xfs_dialloc |
| From: | Mark Tinguely <tinguely@xxxxxxx> |
| Date: | Thu, 26 Jul 2012 12:47:26 -0500 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20120704145616.894941902@xxxxxxxxxxxxxxxxxxxxxx> |
| References: | <20120704145444.863203951@xxxxxxxxxxxxxxxxxxxxxx> <20120704145616.894941902@xxxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0 |
+ if (pass < 2) {
+ /*
+ * Is there enough free space for the file plus a block
+ * of inodes?
+ */
+ xfs_extlen_t longest = pag->pagf_longest;
+ int needspace =
+ S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode);
+
+ if (!longest)
+ longest = pag->pagf_flcount > 0;
+
+ if (pag->pagf_freeblks <
+ XFS_IALLOC_BLOCKS(mp) + needspace)
+ goto nextag;
^^^^^^^ here
+ if (longest < XFS_IALLOC_BLOCKS(mp))
+ goto nextag;
^^^^^^^ and here
+ }
Isn't the agbp locked from the earlier xfs_ialloc_read_agi()?
Do we want to release them before going on to the next AG?
Thank-you,
--Mark.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH v5 4/4]xfs: xfs_seek_hole() refinements with lookup hole offset from page cache., Jeff Liu |
|---|---|
| Next by Date: | Re: [PATCH 3/7] xfs: remove the alloc_done argument to xfs_dialloc, Mark Tinguely |
| Previous by Thread: | [PATCH 7/7] xfs: merge xfs_ialloc_ag_select into xfs_dialloc, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 7/7] xfs: merge xfs_ialloc_ag_select into xfs_dialloc, Mark Tinguely |
| Indexes: | [Date] [Thread] [Top] [All Lists] |