2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include "xfs_shared.h"
21 #include "xfs_format.h"
22 #include "xfs_log_format.h"
23 #include "xfs_trans_resv.h"
26 #include "xfs_mount.h"
27 #include "xfs_inode.h"
29 #include "xfs_bmap_util.h"
30 #include "xfs_bmap_btree.h"
31 #include "xfs_alloc.h"
32 #include "xfs_error.h"
33 #include "xfs_trans.h"
34 #include "xfs_trans_space.h"
35 #include "xfs_trace.h"
37 #include "xfs_icache.h"
38 #include "xfs_rtalloc.h"
42 * Realtime allocator bitmap functions shared with userspace.
46 * Get a buffer for the bitmap or summary file block specified.
47 * The buffer is returned read and locked.
51 xfs_mount_t *mp, /* file system mount structure */
52 xfs_trans_t *tp, /* transaction pointer */
53 xfs_rtblock_t block, /* block number in bitmap or summary */
54 int issum, /* is summary not bitmap */
55 xfs_buf_t **bpp) /* output: buffer for the block */
57 xfs_buf_t *bp; /* block buffer, result */
58 xfs_inode_t *ip; /* bitmap or summary inode */
61 int error; /* error value */
63 ip = issum ? mp->m_rsumip : mp->m_rbmip;
65 error = xfs_bmapi_read(ip, block, 1, &map, &nmap, XFS_DATA_FORK);
69 ASSERT(map.br_startblock != NULLFSBLOCK);
70 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
71 XFS_FSB_TO_DADDR(mp, map.br_startblock),
72 mp->m_bsize, 0, &bp, NULL);
80 * Searching backward from start to limit, find the first block whose
81 * allocated/free state is different from start's.
85 xfs_mount_t *mp, /* file system mount point */
86 xfs_trans_t *tp, /* transaction pointer */
87 xfs_rtblock_t start, /* starting block to look at */
88 xfs_rtblock_t limit, /* last block to look at */
89 xfs_rtblock_t *rtblock) /* out: start block found */
91 xfs_rtword_t *b; /* current word in buffer */
92 int bit; /* bit number in the word */
93 xfs_rtblock_t block; /* bitmap block number */
94 xfs_buf_t *bp; /* buf for the block */
95 xfs_rtword_t *bufp; /* starting word in buffer */
96 int error; /* error value */
97 xfs_rtblock_t firstbit; /* first useful bit in the word */
98 xfs_rtblock_t i; /* current bit number rel. to start */
99 xfs_rtblock_t len; /* length of inspected area */
100 xfs_rtword_t mask; /* mask of relevant bits for value */
101 xfs_rtword_t want; /* mask for "good" values */
102 xfs_rtword_t wdiff; /* difference from wanted value */
103 int word; /* word number in the buffer */
106 * Compute and read in starting bitmap block for starting block.
108 block = XFS_BITTOBLOCK(mp, start);
109 error = xfs_rtbuf_get(mp, tp, block, 0, &bp);
115 * Get the first word's index & point to it.
117 word = XFS_BITTOWORD(mp, start);
119 bit = (int)(start & (XFS_NBWORD - 1));
120 len = start - limit + 1;
122 * Compute match value, based on the bit at start: if 1 (free)
123 * then all-ones, else all-zeroes.
125 want = (*b & ((xfs_rtword_t)1 << bit)) ? -1 : 0;
127 * If the starting position is not word-aligned, deal with the
130 if (bit < XFS_NBWORD - 1) {
132 * Calculate first (leftmost) bit number to look at,
133 * and mask for all the relevant bits in this word.
135 firstbit = XFS_RTMAX((xfs_srtblock_t)(bit - len + 1), 0);
136 mask = (((xfs_rtword_t)1 << (bit - firstbit + 1)) - 1) <<
139 * Calculate the difference between the value there
140 * and what we're looking for.
142 if ((wdiff = (*b ^ want) & mask)) {
144 * Different. Mark where we are and return.
146 xfs_trans_brelse(tp, bp);
147 i = bit - XFS_RTHIBIT(wdiff);
148 *rtblock = start - i + 1;
151 i = bit - firstbit + 1;
153 * Go on to previous block if that's where the previous word is
154 * and we need the previous word.
156 if (--word == -1 && i < len) {
158 * If done with this block, get the previous one.
160 xfs_trans_brelse(tp, bp);
161 error = xfs_rtbuf_get(mp, tp, --block, 0, &bp);
166 word = XFS_BLOCKWMASK(mp);
170 * Go on to the previous word in the buffer.
176 * Starting on a word boundary, no partial word.
181 * Loop over whole words in buffers. When we use up one buffer
182 * we move on to the previous one.
184 while (len - i >= XFS_NBWORD) {
186 * Compute difference between actual and desired value.
188 if ((wdiff = *b ^ want)) {
190 * Different, mark where we are and return.
192 xfs_trans_brelse(tp, bp);
193 i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff);
194 *rtblock = start - i + 1;
199 * Go on to previous block if that's where the previous word is
200 * and we need the previous word.
202 if (--word == -1 && i < len) {
204 * If done with this block, get the previous one.
206 xfs_trans_brelse(tp, bp);
207 error = xfs_rtbuf_get(mp, tp, --block, 0, &bp);
212 word = XFS_BLOCKWMASK(mp);
216 * Go on to the previous word in the buffer.
222 * If not ending on a word boundary, deal with the last
227 * Calculate first (leftmost) bit number to look at,
228 * and mask for all the relevant bits in this word.
230 firstbit = XFS_NBWORD - (len - i);
231 mask = (((xfs_rtword_t)1 << (len - i)) - 1) << firstbit;
233 * Compute difference between actual and desired value.
235 if ((wdiff = (*b ^ want) & mask)) {
237 * Different, mark where we are and return.
239 xfs_trans_brelse(tp, bp);
240 i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff);
241 *rtblock = start - i + 1;
247 * No match, return that we scanned the whole area.
249 xfs_trans_brelse(tp, bp);
250 *rtblock = start - i + 1;
255 * Searching forward from start to limit, find the first block whose
256 * allocated/free state is different from start's.
260 xfs_mount_t *mp, /* file system mount point */
261 xfs_trans_t *tp, /* transaction pointer */
262 xfs_rtblock_t start, /* starting block to look at */
263 xfs_rtblock_t limit, /* last block to look at */
264 xfs_rtblock_t *rtblock) /* out: start block found */
266 xfs_rtword_t *b; /* current word in buffer */
267 int bit; /* bit number in the word */
268 xfs_rtblock_t block; /* bitmap block number */
269 xfs_buf_t *bp; /* buf for the block */
270 xfs_rtword_t *bufp; /* starting word in buffer */
271 int error; /* error value */
272 xfs_rtblock_t i; /* current bit number rel. to start */
273 xfs_rtblock_t lastbit; /* last useful bit in the word */
274 xfs_rtblock_t len; /* length of inspected area */
275 xfs_rtword_t mask; /* mask of relevant bits for value */
276 xfs_rtword_t want; /* mask for "good" values */
277 xfs_rtword_t wdiff; /* difference from wanted value */
278 int word; /* word number in the buffer */
281 * Compute and read in starting bitmap block for starting block.
283 block = XFS_BITTOBLOCK(mp, start);
284 error = xfs_rtbuf_get(mp, tp, block, 0, &bp);
290 * Get the first word's index & point to it.
292 word = XFS_BITTOWORD(mp, start);
294 bit = (int)(start & (XFS_NBWORD - 1));
295 len = limit - start + 1;
297 * Compute match value, based on the bit at start: if 1 (free)
298 * then all-ones, else all-zeroes.
300 want = (*b & ((xfs_rtword_t)1 << bit)) ? -1 : 0;
302 * If the starting position is not word-aligned, deal with the
307 * Calculate last (rightmost) bit number to look at,
308 * and mask for all the relevant bits in this word.
310 lastbit = XFS_RTMIN(bit + len, XFS_NBWORD);
311 mask = (((xfs_rtword_t)1 << (lastbit - bit)) - 1) << bit;
313 * Calculate the difference between the value there
314 * and what we're looking for.
316 if ((wdiff = (*b ^ want) & mask)) {
318 * Different. Mark where we are and return.
320 xfs_trans_brelse(tp, bp);
321 i = XFS_RTLOBIT(wdiff) - bit;
322 *rtblock = start + i - 1;
327 * Go on to next block if that's where the next word is
328 * and we need the next word.
330 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
332 * If done with this block, get the previous one.
334 xfs_trans_brelse(tp, bp);
335 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
339 b = bufp = bp->b_addr;
343 * Go on to the previous word in the buffer.
349 * Starting on a word boundary, no partial word.
354 * Loop over whole words in buffers. When we use up one buffer
355 * we move on to the next one.
357 while (len - i >= XFS_NBWORD) {
359 * Compute difference between actual and desired value.
361 if ((wdiff = *b ^ want)) {
363 * Different, mark where we are and return.
365 xfs_trans_brelse(tp, bp);
366 i += XFS_RTLOBIT(wdiff);
367 *rtblock = start + i - 1;
372 * Go on to next block if that's where the next word is
373 * and we need the next word.
375 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
377 * If done with this block, get the next one.
379 xfs_trans_brelse(tp, bp);
380 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
384 b = bufp = bp->b_addr;
388 * Go on to the next word in the buffer.
394 * If not ending on a word boundary, deal with the last
397 if ((lastbit = len - i)) {
399 * Calculate mask for all the relevant bits in this word.
401 mask = ((xfs_rtword_t)1 << lastbit) - 1;
403 * Compute difference between actual and desired value.
405 if ((wdiff = (*b ^ want) & mask)) {
407 * Different, mark where we are and return.
409 xfs_trans_brelse(tp, bp);
410 i += XFS_RTLOBIT(wdiff);
411 *rtblock = start + i - 1;
417 * No match, return that we scanned the whole area.
419 xfs_trans_brelse(tp, bp);
420 *rtblock = start + i - 1;
425 * Read and/or modify the summary information for a given extent size,
426 * bitmap block combination.
427 * Keeps track of a current summary block, so we don't keep reading
428 * it from the buffer cache.
430 * Summary information is returned in *sum if specified.
431 * If no delta is specified, returns summary only.
434 xfs_rtmodify_summary_int(
435 xfs_mount_t *mp, /* file system mount structure */
436 xfs_trans_t *tp, /* transaction pointer */
437 int log, /* log2 of extent size */
438 xfs_rtblock_t bbno, /* bitmap block number */
439 int delta, /* change to make to summary info */
440 xfs_buf_t **rbpp, /* in/out: summary block buffer */
441 xfs_fsblock_t *rsb, /* in/out: summary block number */
442 xfs_suminfo_t *sum) /* out: summary info for this block */
444 xfs_buf_t *bp; /* buffer for the summary block */
445 int error; /* error value */
446 xfs_fsblock_t sb; /* summary fsblock */
447 int so; /* index into the summary file */
448 xfs_suminfo_t *sp; /* pointer to returned data */
451 * Compute entry number in the summary file.
453 so = XFS_SUMOFFS(mp, log, bbno);
455 * Compute the block number in the summary file.
457 sb = XFS_SUMOFFSTOBLOCK(mp, so);
459 * If we have an old buffer, and the block number matches, use that.
461 if (*rbpp && *rsb == sb)
464 * Otherwise we have to get the buffer.
468 * If there was an old one, get rid of it first.
471 xfs_trans_brelse(tp, *rbpp);
472 error = xfs_rtbuf_get(mp, tp, sb, 1, &bp);
477 * Remember this buffer and block for the next call.
483 * Point to the summary information, modify/log it, and/or copy it out.
485 sp = XFS_SUMPTR(mp, bp, so);
487 uint first = (uint)((char *)sp - (char *)bp->b_addr);
490 xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1);
498 xfs_rtmodify_summary(
499 xfs_mount_t *mp, /* file system mount structure */
500 xfs_trans_t *tp, /* transaction pointer */
501 int log, /* log2 of extent size */
502 xfs_rtblock_t bbno, /* bitmap block number */
503 int delta, /* change to make to summary info */
504 xfs_buf_t **rbpp, /* in/out: summary block buffer */
505 xfs_fsblock_t *rsb) /* in/out: summary block number */
507 return xfs_rtmodify_summary_int(mp, tp, log, bbno,
508 delta, rbpp, rsb, NULL);
512 * Set the given range of bitmap bits to the given value.
513 * Do whatever I/O and logging is required.
517 xfs_mount_t *mp, /* file system mount point */
518 xfs_trans_t *tp, /* transaction pointer */
519 xfs_rtblock_t start, /* starting block to modify */
520 xfs_extlen_t len, /* length of extent to modify */
521 int val) /* 1 for free, 0 for allocated */
523 xfs_rtword_t *b; /* current word in buffer */
524 int bit; /* bit number in the word */
525 xfs_rtblock_t block; /* bitmap block number */
526 xfs_buf_t *bp; /* buf for the block */
527 xfs_rtword_t *bufp; /* starting word in buffer */
528 int error; /* error value */
529 xfs_rtword_t *first; /* first used word in the buffer */
530 int i; /* current bit number rel. to start */
531 int lastbit; /* last useful bit in word */
532 xfs_rtword_t mask; /* mask o frelevant bits for value */
533 int word; /* word number in the buffer */
536 * Compute starting bitmap block number.
538 block = XFS_BITTOBLOCK(mp, start);
540 * Read the bitmap block, and point to its data.
542 error = xfs_rtbuf_get(mp, tp, block, 0, &bp);
548 * Compute the starting word's address, and starting bit.
550 word = XFS_BITTOWORD(mp, start);
551 first = b = &bufp[word];
552 bit = (int)(start & (XFS_NBWORD - 1));
554 * 0 (allocated) => all zeroes; 1 (free) => all ones.
558 * If not starting on a word boundary, deal with the first
563 * Compute first bit not changed and mask of relevant bits.
565 lastbit = XFS_RTMIN(bit + len, XFS_NBWORD);
566 mask = (((xfs_rtword_t)1 << (lastbit - bit)) - 1) << bit;
568 * Set/clear the active bits.
576 * Go on to the next block if that's where the next word is
577 * and we need the next word.
579 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
581 * Log the changed part of this block.
584 xfs_trans_log_buf(tp, bp,
585 (uint)((char *)first - (char *)bufp),
586 (uint)((char *)b - (char *)bufp));
587 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
591 first = b = bufp = bp->b_addr;
595 * Go on to the next word in the buffer
601 * Starting on a word boundary, no partial word.
606 * Loop over whole words in buffers. When we use up one buffer
607 * we move on to the next one.
609 while (len - i >= XFS_NBWORD) {
611 * Set the word value correctly.
616 * Go on to the next block if that's where the next word is
617 * and we need the next word.
619 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
621 * Log the changed part of this block.
624 xfs_trans_log_buf(tp, bp,
625 (uint)((char *)first - (char *)bufp),
626 (uint)((char *)b - (char *)bufp));
627 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
631 first = b = bufp = bp->b_addr;
635 * Go on to the next word in the buffer
641 * If not ending on a word boundary, deal with the last
644 if ((lastbit = len - i)) {
646 * Compute a mask of relevant bits.
649 mask = ((xfs_rtword_t)1 << lastbit) - 1;
651 * Set/clear the active bits.
660 * Log any remaining changed bytes.
663 xfs_trans_log_buf(tp, bp, (uint)((char *)first - (char *)bufp),
664 (uint)((char *)b - (char *)bufp - 1));
669 * Mark an extent specified by start and len freed.
670 * Updates all the summary information as well as the bitmap.
674 xfs_mount_t *mp, /* file system mount point */
675 xfs_trans_t *tp, /* transaction pointer */
676 xfs_rtblock_t start, /* starting block to free */
677 xfs_extlen_t len, /* length to free */
678 xfs_buf_t **rbpp, /* in/out: summary block buffer */
679 xfs_fsblock_t *rsb) /* in/out: summary block number */
681 xfs_rtblock_t end; /* end of the freed extent */
682 int error; /* error value */
683 xfs_rtblock_t postblock; /* first block freed > end */
684 xfs_rtblock_t preblock; /* first block freed < start */
686 end = start + len - 1;
688 * Modify the bitmap to mark this extent freed.
690 error = xfs_rtmodify_range(mp, tp, start, len, 1);
695 * Assume we're freeing out of the middle of an allocated extent.
696 * We need to find the beginning and end of the extent so we can
697 * properly update the summary.
699 error = xfs_rtfind_back(mp, tp, start, 0, &preblock);
704 * Find the next allocated block (end of allocated extent).
706 error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1,
711 * If there are blocks not being freed at the front of the
712 * old extent, add summary data for them to be allocated.
714 if (preblock < start) {
715 error = xfs_rtmodify_summary(mp, tp,
716 XFS_RTBLOCKLOG(start - preblock),
717 XFS_BITTOBLOCK(mp, preblock), -1, rbpp, rsb);
723 * If there are blocks not being freed at the end of the
724 * old extent, add summary data for them to be allocated.
726 if (postblock > end) {
727 error = xfs_rtmodify_summary(mp, tp,
728 XFS_RTBLOCKLOG(postblock - end),
729 XFS_BITTOBLOCK(mp, end + 1), -1, rbpp, rsb);
735 * Increment the summary information corresponding to the entire
738 error = xfs_rtmodify_summary(mp, tp,
739 XFS_RTBLOCKLOG(postblock + 1 - preblock),
740 XFS_BITTOBLOCK(mp, preblock), 1, rbpp, rsb);
745 * Check that the given range is either all allocated (val = 0) or
746 * all free (val = 1).
750 xfs_mount_t *mp, /* file system mount point */
751 xfs_trans_t *tp, /* transaction pointer */
752 xfs_rtblock_t start, /* starting block number of extent */
753 xfs_extlen_t len, /* length of extent */
754 int val, /* 1 for free, 0 for allocated */
755 xfs_rtblock_t *new, /* out: first block not matching */
756 int *stat) /* out: 1 for matches, 0 for not */
758 xfs_rtword_t *b; /* current word in buffer */
759 int bit; /* bit number in the word */
760 xfs_rtblock_t block; /* bitmap block number */
761 xfs_buf_t *bp; /* buf for the block */
762 xfs_rtword_t *bufp; /* starting word in buffer */
763 int error; /* error value */
764 xfs_rtblock_t i; /* current bit number rel. to start */
765 xfs_rtblock_t lastbit; /* last useful bit in word */
766 xfs_rtword_t mask; /* mask of relevant bits for value */
767 xfs_rtword_t wdiff; /* difference from wanted value */
768 int word; /* word number in the buffer */
771 * Compute starting bitmap block number
773 block = XFS_BITTOBLOCK(mp, start);
775 * Read the bitmap block.
777 error = xfs_rtbuf_get(mp, tp, block, 0, &bp);
783 * Compute the starting word's address, and starting bit.
785 word = XFS_BITTOWORD(mp, start);
787 bit = (int)(start & (XFS_NBWORD - 1));
789 * 0 (allocated) => all zero's; 1 (free) => all one's.
793 * If not starting on a word boundary, deal with the first
798 * Compute first bit not examined.
800 lastbit = XFS_RTMIN(bit + len, XFS_NBWORD);
802 * Mask of relevant bits.
804 mask = (((xfs_rtword_t)1 << (lastbit - bit)) - 1) << bit;
806 * Compute difference between actual and desired value.
808 if ((wdiff = (*b ^ val) & mask)) {
810 * Different, compute first wrong bit and return.
812 xfs_trans_brelse(tp, bp);
813 i = XFS_RTLOBIT(wdiff) - bit;
820 * Go on to next block if that's where the next word is
821 * and we need the next word.
823 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
825 * If done with this block, get the next one.
827 xfs_trans_brelse(tp, bp);
828 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
832 b = bufp = bp->b_addr;
836 * Go on to the next word in the buffer.
842 * Starting on a word boundary, no partial word.
847 * Loop over whole words in buffers. When we use up one buffer
848 * we move on to the next one.
850 while (len - i >= XFS_NBWORD) {
852 * Compute difference between actual and desired value.
854 if ((wdiff = *b ^ val)) {
856 * Different, compute first wrong bit and return.
858 xfs_trans_brelse(tp, bp);
859 i += XFS_RTLOBIT(wdiff);
866 * Go on to next block if that's where the next word is
867 * and we need the next word.
869 if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
871 * If done with this block, get the next one.
873 xfs_trans_brelse(tp, bp);
874 error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp);
878 b = bufp = bp->b_addr;
882 * Go on to the next word in the buffer.
888 * If not ending on a word boundary, deal with the last
891 if ((lastbit = len - i)) {
893 * Mask of relevant bits.
895 mask = ((xfs_rtword_t)1 << lastbit) - 1;
897 * Compute difference between actual and desired value.
899 if ((wdiff = (*b ^ val) & mask)) {
901 * Different, compute first wrong bit and return.
903 xfs_trans_brelse(tp, bp);
904 i += XFS_RTLOBIT(wdiff);
912 * Successful, return.
914 xfs_trans_brelse(tp, bp);
922 * Check that the given extent (block range) is allocated already.
924 STATIC int /* error */
925 xfs_rtcheck_alloc_range(
926 xfs_mount_t *mp, /* file system mount point */
927 xfs_trans_t *tp, /* transaction pointer */
928 xfs_rtblock_t bno, /* starting block number of extent */
929 xfs_extlen_t len) /* length of extent */
931 xfs_rtblock_t new; /* dummy for xfs_rtcheck_range */
935 error = xfs_rtcheck_range(mp, tp, bno, len, 0, &new, &stat);
942 #define xfs_rtcheck_alloc_range(m,t,b,l) (0)
945 * Free an extent in the realtime subvolume. Length is expressed in
946 * realtime extents, as is the block number.
950 xfs_trans_t *tp, /* transaction pointer */
951 xfs_rtblock_t bno, /* starting block number to free */
952 xfs_extlen_t len) /* length of extent freed */
954 int error; /* error value */
955 xfs_mount_t *mp; /* file system mount structure */
956 xfs_fsblock_t sb; /* summary file block number */
957 xfs_buf_t *sumbp = NULL; /* summary file block buffer */
961 ASSERT(mp->m_rbmip->i_itemp != NULL);
962 ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
964 error = xfs_rtcheck_alloc_range(mp, tp, bno, len);
969 * Free the range of realtime blocks.
971 error = xfs_rtfree_range(mp, tp, bno, len, &sumbp, &sb);
976 * Mark more blocks free in the superblock.
978 xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS, (long)len);
980 * If we've now freed all the blocks, reset the file sequence
983 if (tp->t_frextents_delta + mp->m_sb.sb_frextents ==
984 mp->m_sb.sb_rextents) {
985 if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM))
986 mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM;
987 *(__uint64_t *)&mp->m_rbmip->i_d.di_atime = 0;
988 xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);