* [PATCH 0/7] a couple more random cleanups for 2.6.30
@ 2009-02-20 8:52 Christoph Hellwig
2009-02-20 8:52 ` [PATCH 1/7] xfs: cleanup log unmount handling Christoph Hellwig
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw)
To: xfs
Misc patch queue.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 20+ messages in thread* [PATCH 1/7] xfs: cleanup log unmount handling 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:49 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 2/7] xfs: remove another leftover of the old inode log item format Christoph Hellwig ` (6 subsequent siblings) 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-cleanup-log-unmount --] [-- Type: text/plain, Size: 2750 bytes --] Kill the current xfs_log_unmount wrapper and opencode the two function calls in the only caller. Rename the current xfs_log_unmount_dealloc to xfs_log_unmount as it undoes xfs_log_mount and the new name makes that more clear. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/xfs_log.c =================================================================== --- xfs.orig/fs/xfs/xfs_log.c 2009-02-10 19:18:54.177068965 +0100 +++ xfs/fs/xfs/xfs_log.c 2009-02-10 19:21:28.338068613 +0100 @@ -635,19 +635,6 @@ xfs_log_mount_finish(xfs_mount_t *mp) } /* - * Unmount processing for the log. - */ -int -xfs_log_unmount(xfs_mount_t *mp) -{ - int error; - - error = xfs_log_unmount_write(mp); - xfs_log_unmount_dealloc(mp); - return error; -} - -/* * Final log writes as part of unmount. * * Mark the filesystem clean as unmount happens. Note that during relocation @@ -797,7 +784,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) * and deallocate the log as the aild references the log. */ void -xfs_log_unmount_dealloc(xfs_mount_t *mp) +xfs_log_unmount(xfs_mount_t *mp) { xfs_trans_ail_destroy(mp); xlog_dealloc_log(mp->m_log); Index: xfs/fs/xfs/xfs_log.h =================================================================== --- xfs.orig/fs/xfs/xfs_log.h 2009-02-10 11:10:41.813069852 +0100 +++ xfs/fs/xfs/xfs_log.h 2009-02-10 19:21:28.338068613 +0100 @@ -170,9 +170,8 @@ int xfs_log_write(struct xfs_mount *mp int nentries, xfs_log_ticket_t ticket, xfs_lsn_t *start_lsn); -int xfs_log_unmount(struct xfs_mount *mp); int xfs_log_unmount_write(struct xfs_mount *mp); -void xfs_log_unmount_dealloc(struct xfs_mount *mp); +void xfs_log_unmount(struct xfs_mount *mp); int xfs_log_force_umount(struct xfs_mount *mp, int logerror); int xfs_log_need_covered(struct xfs_mount *mp); Index: xfs/fs/xfs/xfs_mount.c =================================================================== --- xfs.orig/fs/xfs/xfs_mount.c 2009-02-10 19:16:19.537069383 +0100 +++ xfs/fs/xfs/xfs_mount.c 2009-02-10 19:21:28.339069370 +0100 @@ -1194,7 +1194,7 @@ xfs_mountfs( out_rele_rip: IRELE(rip); out_log_dealloc: - xfs_log_unmount_dealloc(mp); + xfs_log_unmount(mp); out_free_perag: xfs_free_perag(mp); out_remove_uuid: @@ -1280,7 +1280,8 @@ xfs_unmountfs( "Freespace may not be correct on next mount."); xfs_unmountfs_writesb(mp); xfs_unmountfs_wait(mp); /* wait for async bufs */ - xfs_log_unmount(mp); /* Done! No more fs ops. */ + xfs_log_unmount_write(mp); + xfs_log_unmount(mp); if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) uuid_table_remove(&mp->m_sb.sb_uuid); _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/7] xfs: cleanup log unmount handling 2009-02-20 8:52 ` [PATCH 1/7] xfs: cleanup log unmount handling Christoph Hellwig @ 2009-03-15 7:49 ` Dave Chinner 0 siblings, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:49 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:08AM -0500, Christoph Hellwig wrote: > Kill the current xfs_log_unmount wrapper and opencode the two function > calls in the only caller. Rename the current xfs_log_unmount_dealloc to > xfs_log_unmount as it undoes xfs_log_mount and the new name makes that > more clear. Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/7] xfs: remove another leftover of the old inode log item format 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 2009-02-20 8:52 ` [PATCH 1/7] xfs: cleanup log unmount handling Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:49 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 3/7] xfs: cleanup xlog_recover_do_trans Christoph Hellwig ` (5 subsequent siblings) 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-kill-xlog_recover_do_inode_trans-special-case --] [-- Type: text/plain, Size: 1121 bytes --] There's another little snipplet of code left from the handling of the old inode log item format in xlog_recover_do_inode_trans. Kill it as it can't be reached anymore. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/xfs_log_recover.c =================================================================== --- xfs.orig/fs/xfs/xfs_log_recover.c 2009-02-15 19:55:53.424104583 +0100 +++ xfs/fs/xfs/xfs_log_recover.c 2009-02-15 19:56:17.286945615 +0100 @@ -2519,16 +2519,10 @@ xlog_recover_do_inode_trans( } write_inode_buffer: - if (ITEM_TYPE(item) == XFS_LI_INODE) { - ASSERT(bp->b_mount == NULL || bp->b_mount == mp); - bp->b_mount = mp; - XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); - xfs_bdwrite(mp, bp); - } else { - XFS_BUF_STALE(bp); - error = xfs_bwrite(mp, bp); - } - + ASSERT(bp->b_mount == NULL || bp->b_mount == mp); + bp->b_mount = mp; + XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); + xfs_bdwrite(mp, bp); error: if (need_free) kmem_free(in_f); _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/7] xfs: remove another leftover of the old inode log item format 2009-02-20 8:52 ` [PATCH 2/7] xfs: remove another leftover of the old inode log item format Christoph Hellwig @ 2009-03-15 7:49 ` Dave Chinner 0 siblings, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:49 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:09AM -0500, Christoph Hellwig wrote: > There's another little snipplet of code left from the handling of the old > inode log item format in xlog_recover_do_inode_trans. Kill it as it > can't be reached anymore. Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/7] xfs: cleanup xlog_recover_do_trans 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 2009-02-20 8:52 ` [PATCH 1/7] xfs: cleanup log unmount handling Christoph Hellwig 2009-02-20 8:52 ` [PATCH 2/7] xfs: remove another leftover of the old inode log item format Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:50 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 4/7] xfs: cleanup xlog_bread Christoph Hellwig ` (4 subsequent siblings) 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-cleanup-xlog_recover_do_trans --] [-- Type: text/plain, Size: 3007 bytes --] Change the big if-elsif-else block handling the different item types into a more natural switch, remove assignments in conditionals and remove an out of place comment from centuries ago on IRIX. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/xfs_log_recover.c =================================================================== --- xfs.orig/fs/xfs/xfs_log_recover.c 2009-02-19 20:39:19.268070123 +0100 +++ xfs/fs/xfs/xfs_log_recover.c 2009-02-19 20:42:06.038944151 +0100 @@ -2763,51 +2763,48 @@ xlog_recover_do_trans( int error = 0; xlog_recover_item_t *item, *first_item; - if ((error = xlog_recover_reorder_trans(trans))) + error = xlog_recover_reorder_trans(trans); + if (error) return error; + first_item = item = trans->r_itemq; do { - /* - * we don't need to worry about the block number being - * truncated in > 1 TB buffers because in user-land, - * we're now n32 or 64-bit so xfs_daddr_t is 64-bits so - * the blknos will get through the user-mode buffer - * cache properly. The only bad case is o32 kernels - * where xfs_daddr_t is 32-bits but mount will warn us - * off a > 1 TB filesystem before we get here. - */ - if ((ITEM_TYPE(item) == XFS_LI_BUF)) { - if ((error = xlog_recover_do_buffer_trans(log, item, - pass))) - break; - } else if ((ITEM_TYPE(item) == XFS_LI_INODE)) { - if ((error = xlog_recover_do_inode_trans(log, item, - pass))) - break; - } else if (ITEM_TYPE(item) == XFS_LI_EFI) { - if ((error = xlog_recover_do_efi_trans(log, item, trans->r_lsn, - pass))) - break; - } else if (ITEM_TYPE(item) == XFS_LI_EFD) { + switch (ITEM_TYPE(item)) { + case XFS_LI_BUF: + error = xlog_recover_do_buffer_trans(log, item, pass); + break; + case XFS_LI_INODE: + error = xlog_recover_do_inode_trans(log, item, pass); + break; + case XFS_LI_EFI: + error = xlog_recover_do_efi_trans(log, item, + trans->r_lsn, pass); + break; + case XFS_LI_EFD: xlog_recover_do_efd_trans(log, item, pass); - } else if (ITEM_TYPE(item) == XFS_LI_DQUOT) { - if ((error = xlog_recover_do_dquot_trans(log, item, - pass))) - break; - } else if ((ITEM_TYPE(item) == XFS_LI_QUOTAOFF)) { - if ((error = xlog_recover_do_quotaoff_trans(log, item, - pass))) - break; - } else { - xlog_warn("XFS: xlog_recover_do_trans"); + error = 0; + break; + case XFS_LI_DQUOT: + error = xlog_recover_do_dquot_trans(log, item, pass); + break; + case XFS_LI_QUOTAOFF: + error = xlog_recover_do_quotaoff_trans(log, item, + pass); + break; + default: + xlog_warn( + "XFS: invalid item type (%d) xlog_recover_do_trans", ITEM_TYPE(item)); ASSERT(0); error = XFS_ERROR(EIO); break; } + + if (error) + return error; item = item->ri_next; } while (first_item != item); - return error; + return 0; } /* _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/7] xfs: cleanup xlog_recover_do_trans 2009-02-20 8:52 ` [PATCH 3/7] xfs: cleanup xlog_recover_do_trans Christoph Hellwig @ 2009-03-15 7:50 ` Dave Chinner 0 siblings, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:50 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:10AM -0500, Christoph Hellwig wrote: > Change the big if-elsif-else block handling the different item types > into a more natural switch, remove assignments in conditionals and > remove an out of place comment from centuries ago on IRIX. Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 4/7] xfs: cleanup xlog_bread 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig ` (2 preceding siblings ...) 2009-02-20 8:52 ` [PATCH 3/7] xfs: cleanup xlog_recover_do_trans Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-02-22 22:48 ` Josef 'Jeff' Sipek 2009-03-15 7:53 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 5/7] xfs: kill vn_atime_* helpers Christoph Hellwig ` (3 subsequent siblings) 7 siblings, 2 replies; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-cleanup-xlog_bread --] [-- Type: text/plain, Size: 13632 bytes --] Most callers of xlog_bread need to call xlog_align to get the actual offset. Consolidate that call into the main xlog_bread and provide a _xlog_bread for those few that don't want the actual offset. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/xfs_log_priv.h =================================================================== --- xfs.orig/fs/xfs/xfs_log_priv.h 2009-02-10 19:16:19.308944151 +0100 +++ xfs/fs/xfs/xfs_log_priv.h 2009-02-10 19:22:43.915068626 +0100 @@ -455,7 +455,6 @@ extern void xlog_recover_process_iunlin extern struct xfs_buf *xlog_get_bp(xlog_t *, int); extern void xlog_put_bp(struct xfs_buf *); -extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); extern kmem_zone_t *xfs_log_ticket_zone; Index: xfs/fs/xfs/xfs_log_recover.c =================================================================== --- xfs.orig/fs/xfs/xfs_log_recover.c 2009-02-10 19:16:19.314973900 +0100 +++ xfs/fs/xfs/xfs_log_recover.c 2009-02-10 19:22:43.917068532 +0100 @@ -94,12 +94,30 @@ xlog_put_bp( xfs_buf_free(bp); } +STATIC xfs_caddr_t +xlog_align( + xlog_t *log, + xfs_daddr_t blk_no, + int nbblks, + xfs_buf_t *bp) +{ + xfs_caddr_t ptr; + + if (!log->l_sectbb_log) + return XFS_BUF_PTR(bp); + + ptr = XFS_BUF_PTR(bp) + BBTOB((int)blk_no & log->l_sectbb_mask); + ASSERT(XFS_BUF_SIZE(bp) >= + BBTOB(nbblks + (blk_no & log->l_sectbb_mask))); + return ptr; +} + /* * nbblks should be uint, but oh well. Just want to catch that 32-bit length. */ -int -xlog_bread( +STATIC int +_xlog_bread( xlog_t *log, xfs_daddr_t blk_no, int nbblks, @@ -137,6 +155,24 @@ xlog_bread( return error; } +STATIC int +xlog_bread( + xlog_t *log, + xfs_daddr_t blk_no, + int nbblks, + xfs_buf_t *bp, + xfs_caddr_t *offset) +{ + int error; + + error = _xlog_bread(log, blk_no, nbblks, bp); + if (error) + return error; + + *offset = xlog_align(log, blk_no, nbblks, bp); + return 0; +} + /* * Write out the buffer at the given block for the given number of blocks. * The buffer is kept locked across the write and is returned locked. @@ -180,24 +216,6 @@ xlog_bwrite( return error; } -STATIC xfs_caddr_t -xlog_align( - xlog_t *log, - xfs_daddr_t blk_no, - int nbblks, - xfs_buf_t *bp) -{ - xfs_caddr_t ptr; - - if (!log->l_sectbb_log) - return XFS_BUF_PTR(bp); - - ptr = XFS_BUF_PTR(bp) + BBTOB((int)blk_no & log->l_sectbb_mask); - ASSERT(XFS_BUF_SIZE(bp) >= - BBTOB(nbblks + (blk_no & log->l_sectbb_mask))); - return ptr; -} - #ifdef DEBUG /* * dump debug superblock and log record information @@ -321,9 +339,9 @@ xlog_find_cycle_start( mid_blk = BLK_AVG(first_blk, *last_blk); while (mid_blk != first_blk && mid_blk != *last_blk) { - if ((error = xlog_bread(log, mid_blk, 1, bp))) + error = xlog_bread(log, mid_blk, 1, bp, &offset); + if (error) return error; - offset = xlog_align(log, mid_blk, 1, bp); mid_cycle = xlog_get_cycle(offset); if (mid_cycle == cycle) { *last_blk = mid_blk; @@ -379,10 +397,10 @@ xlog_find_verify_cycle( bcount = min(bufblks, (start_blk + nbblks - i)); - if ((error = xlog_bread(log, i, bcount, bp))) + error = xlog_bread(log, i, bcount, bp, &buf); + if (error) goto out; - buf = xlog_align(log, i, bcount, bp); for (j = 0; j < bcount; j++) { cycle = xlog_get_cycle(buf); if (cycle == stop_on_cycle_no) { @@ -436,9 +454,9 @@ xlog_find_verify_log_record( return ENOMEM; smallmem = 1; } else { - if ((error = xlog_bread(log, start_blk, num_blks, bp))) + error = xlog_bread(log, start_blk, num_blks, bp, &offset); + if (error) goto out; - offset = xlog_align(log, start_blk, num_blks, bp); offset += ((num_blks - 1) << BBSHIFT); } @@ -453,9 +471,9 @@ xlog_find_verify_log_record( } if (smallmem) { - if ((error = xlog_bread(log, i, 1, bp))) + error = xlog_bread(log, i, 1, bp, &offset); + if (error) goto out; - offset = xlog_align(log, i, 1, bp); } head = (xlog_rec_header_t *)offset; @@ -559,15 +577,18 @@ xlog_find_head( bp = xlog_get_bp(log, 1); if (!bp) return ENOMEM; - if ((error = xlog_bread(log, 0, 1, bp))) + + error = xlog_bread(log, 0, 1, bp, &offset); + if (error) goto bp_err; - offset = xlog_align(log, 0, 1, bp); + first_half_cycle = xlog_get_cycle(offset); last_blk = head_blk = log_bbnum - 1; /* get cycle # of last block */ - if ((error = xlog_bread(log, last_blk, 1, bp))) + error = xlog_bread(log, last_blk, 1, bp, &offset); + if (error) goto bp_err; - offset = xlog_align(log, last_blk, 1, bp); + last_half_cycle = xlog_get_cycle(offset); ASSERT(last_half_cycle != 0); @@ -817,9 +838,10 @@ xlog_find_tail( if (!bp) return ENOMEM; if (*head_blk == 0) { /* special case */ - if ((error = xlog_bread(log, 0, 1, bp))) + error = xlog_bread(log, 0, 1, bp, &offset); + if (error) goto bread_err; - offset = xlog_align(log, 0, 1, bp); + if (xlog_get_cycle(offset) == 0) { *tail_blk = 0; /* leave all other log inited values alone */ @@ -832,9 +854,10 @@ xlog_find_tail( */ ASSERT(*head_blk < INT_MAX); for (i = (int)(*head_blk) - 1; i >= 0; i--) { - if ((error = xlog_bread(log, i, 1, bp))) + error = xlog_bread(log, i, 1, bp, &offset); + if (error) goto bread_err; - offset = xlog_align(log, i, 1, bp); + if (XLOG_HEADER_MAGIC_NUM == be32_to_cpu(*(__be32 *)offset)) { found = 1; break; @@ -848,9 +871,10 @@ xlog_find_tail( */ if (!found) { for (i = log->l_logBBsize - 1; i >= (int)(*head_blk); i--) { - if ((error = xlog_bread(log, i, 1, bp))) + error = xlog_bread(log, i, 1, bp, &offset); + if (error) goto bread_err; - offset = xlog_align(log, i, 1, bp); + if (XLOG_HEADER_MAGIC_NUM == be32_to_cpu(*(__be32 *)offset)) { found = 2; @@ -922,10 +946,10 @@ xlog_find_tail( if (*head_blk == after_umount_blk && be32_to_cpu(rhead->h_num_logops) == 1) { umount_data_blk = (i + hblks) % log->l_logBBsize; - if ((error = xlog_bread(log, umount_data_blk, 1, bp))) { + error = xlog_bread(log, umount_data_blk, 1, bp, &offset); + if (error) goto bread_err; - } - offset = xlog_align(log, umount_data_blk, 1, bp); + op_head = (xlog_op_header_t *)offset; if (op_head->oh_flags & XLOG_UNMOUNT_TRANS) { /* @@ -1017,9 +1041,10 @@ xlog_find_zeroed( bp = xlog_get_bp(log, 1); if (!bp) return ENOMEM; - if ((error = xlog_bread(log, 0, 1, bp))) + error = xlog_bread(log, 0, 1, bp, &offset); + if (error) goto bp_err; - offset = xlog_align(log, 0, 1, bp); + first_cycle = xlog_get_cycle(offset); if (first_cycle == 0) { /* completely zeroed log */ *blk_no = 0; @@ -1028,9 +1053,10 @@ xlog_find_zeroed( } /* check partially zeroed log */ - if ((error = xlog_bread(log, log_bbnum-1, 1, bp))) + error = xlog_bread(log, log_bbnum-1, 1, bp, &offset); + if (error) goto bp_err; - offset = xlog_align(log, log_bbnum-1, 1, bp); + last_cycle = xlog_get_cycle(offset); if (last_cycle != 0) { /* log completely written to */ xlog_put_bp(bp); @@ -1152,10 +1178,10 @@ xlog_write_log_records( */ balign = XLOG_SECTOR_ROUNDDOWN_BLKNO(log, start_block); if (balign != start_block) { - if ((error = xlog_bread(log, start_block, 1, bp))) { - xlog_put_bp(bp); - return error; - } + error = _xlog_bread(log, start_block, 1, bp); + if (error) + goto out_put_bp; + j = start_block - balign; } @@ -1175,10 +1201,14 @@ xlog_write_log_records( balign = BBTOB(ealign - start_block); error = XFS_BUF_SET_PTR(bp, offset + balign, BBTOB(sectbb)); - if (!error) - error = xlog_bread(log, ealign, sectbb, bp); - if (!error) - error = XFS_BUF_SET_PTR(bp, offset, bufblks); + if (error) + break; + + error = _xlog_bread(log, ealign, sectbb, bp); + if (error) + break; + + error = XFS_BUF_SET_PTR(bp, offset, bufblks); if (error) break; } @@ -1195,6 +1225,8 @@ xlog_write_log_records( start_block += endcount; j = 0; } + + out_put_bp: xlog_put_bp(bp); return error; } @@ -3481,9 +3513,11 @@ xlog_do_recovery_pass( hbp = xlog_get_bp(log, 1); if (!hbp) return ENOMEM; - if ((error = xlog_bread(log, tail_blk, 1, hbp))) + + error = xlog_bread(log, tail_blk, 1, hbp, &offset); + if (error) goto bread_err1; - offset = xlog_align(log, tail_blk, 1, hbp); + rhead = (xlog_rec_header_t *)offset; error = xlog_valid_rec_header(log, rhead, tail_blk); if (error) @@ -3517,9 +3551,10 @@ xlog_do_recovery_pass( memset(rhash, 0, sizeof(rhash)); if (tail_blk <= head_blk) { for (blk_no = tail_blk; blk_no < head_blk; ) { - if ((error = xlog_bread(log, blk_no, hblks, hbp))) + error = xlog_bread(log, blk_no, hblks, hbp, &offset); + if (error) goto bread_err2; - offset = xlog_align(log, blk_no, hblks, hbp); + rhead = (xlog_rec_header_t *)offset; error = xlog_valid_rec_header(log, rhead, blk_no); if (error) @@ -3527,10 +3562,11 @@ xlog_do_recovery_pass( /* blocks in data section */ bblks = (int)BTOBB(be32_to_cpu(rhead->h_len)); - error = xlog_bread(log, blk_no + hblks, bblks, dbp); + error = xlog_bread(log, blk_no + hblks, bblks, dbp, + &offset); if (error) goto bread_err2; - offset = xlog_align(log, blk_no + hblks, bblks, dbp); + xlog_unpack_data(rhead, offset, log); if ((error = xlog_recover_process_data(log, rhash, rhead, offset, pass))) @@ -3553,10 +3589,10 @@ xlog_do_recovery_pass( wrapped_hblks = 0; if (blk_no + hblks <= log->l_logBBsize) { /* Read header in one read */ - error = xlog_bread(log, blk_no, hblks, hbp); + error = xlog_bread(log, blk_no, hblks, hbp, + &offset); if (error) goto bread_err2; - offset = xlog_align(log, blk_no, hblks, hbp); } else { /* This LR is split across physical log end */ if (blk_no != log->l_logBBsize) { @@ -3564,12 +3600,13 @@ xlog_do_recovery_pass( ASSERT(blk_no <= INT_MAX); split_hblks = log->l_logBBsize - (int)blk_no; ASSERT(split_hblks > 0); - if ((error = xlog_bread(log, blk_no, - split_hblks, hbp))) + error = xlog_bread(log, blk_no, + split_hblks, hbp, + &offset); + if (error) goto bread_err2; - offset = xlog_align(log, blk_no, - split_hblks, hbp); } + /* * Note: this black magic still works with * large sector sizes (non-512) only because: @@ -3587,14 +3624,18 @@ xlog_do_recovery_pass( error = XFS_BUF_SET_PTR(hbp, bufaddr + BBTOB(split_hblks), BBTOB(hblks - split_hblks)); - if (!error) - error = xlog_bread(log, 0, - wrapped_hblks, hbp); - if (!error) - error = XFS_BUF_SET_PTR(hbp, bufaddr, + if (error) + goto bread_err2; + + error = _xlog_bread(log, 0, wrapped_hblks, hbp); + if (error) + goto bread_err2; + + error = XFS_BUF_SET_PTR(hbp, bufaddr, BBTOB(hblks)); if (error) goto bread_err2; + if (!offset) offset = xlog_align(log, 0, wrapped_hblks, hbp); @@ -3610,10 +3651,10 @@ xlog_do_recovery_pass( /* Read in data for log record */ if (blk_no + bblks <= log->l_logBBsize) { - error = xlog_bread(log, blk_no, bblks, dbp); + error = xlog_bread(log, blk_no, bblks, dbp, + &offset); if (error) goto bread_err2; - offset = xlog_align(log, blk_no, bblks, dbp); } else { /* This log record is split across the * physical end of log */ @@ -3627,12 +3668,13 @@ xlog_do_recovery_pass( split_bblks = log->l_logBBsize - (int)blk_no; ASSERT(split_bblks > 0); - if ((error = xlog_bread(log, blk_no, - split_bblks, dbp))) + error = xlog_bread(log, blk_no, + split_bblks, dbp, + &offset); + if (error) goto bread_err2; - offset = xlog_align(log, blk_no, - split_bblks, dbp); } + /* * Note: this black magic still works with * large sector sizes (non-512) only because: @@ -3649,15 +3691,19 @@ xlog_do_recovery_pass( error = XFS_BUF_SET_PTR(dbp, bufaddr + BBTOB(split_bblks), BBTOB(bblks - split_bblks)); - if (!error) - error = xlog_bread(log, wrapped_hblks, - bblks - split_bblks, - dbp); - if (!error) - error = XFS_BUF_SET_PTR(dbp, bufaddr, - h_size); if (error) goto bread_err2; + + error = _xlog_bread(log, wrapped_hblks, + bblks - split_bblks, + dbp); + if (error) + goto bread_err2; + + error = XFS_BUF_SET_PTR(dbp, bufaddr, h_size); + if (error) + goto bread_err2; + if (!offset) offset = xlog_align(log, wrapped_hblks, bblks - split_bblks, dbp); @@ -3674,17 +3720,21 @@ xlog_do_recovery_pass( /* read first part of physical log */ while (blk_no < head_blk) { - if ((error = xlog_bread(log, blk_no, hblks, hbp))) + error = xlog_bread(log, blk_no, hblks, hbp, &offset); + if (error) goto bread_err2; - offset = xlog_align(log, blk_no, hblks, hbp); + rhead = (xlog_rec_header_t *)offset; error = xlog_valid_rec_header(log, rhead, blk_no); if (error) goto bread_err2; + bblks = (int)BTOBB(be32_to_cpu(rhead->h_len)); - if ((error = xlog_bread(log, blk_no+hblks, bblks, dbp))) + error = xlog_bread(log, blk_no+hblks, bblks, dbp, + &offset); + if (error) goto bread_err2; - offset = xlog_align(log, blk_no+hblks, bblks, dbp); + xlog_unpack_data(rhead, offset, log); if ((error = xlog_recover_process_data(log, rhash, rhead, offset, pass))) _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/7] xfs: cleanup xlog_bread 2009-02-20 8:52 ` [PATCH 4/7] xfs: cleanup xlog_bread Christoph Hellwig @ 2009-02-22 22:48 ` Josef 'Jeff' Sipek 2009-02-24 14:40 ` Christoph Hellwig 2009-03-15 7:53 ` Dave Chinner 1 sibling, 1 reply; 20+ messages in thread From: Josef 'Jeff' Sipek @ 2009-02-22 22:48 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:11AM -0500, Christoph Hellwig wrote: > Most callers of xlog_bread need to call xlog_align to get the actual offset. > Consolidate that call into the main xlog_bread and provide a _xlog_bread > for those few that don't want the actual offset. Only one leading underscore? IOW, why not not __xlog_bread? (That's definitely more Linux-like.) Josef 'Jeff' Sipek. -- The box said "Windows XP or better required". So I installed Linux. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/7] xfs: cleanup xlog_bread 2009-02-22 22:48 ` Josef 'Jeff' Sipek @ 2009-02-24 14:40 ` Christoph Hellwig 0 siblings, 0 replies; 20+ messages in thread From: Christoph Hellwig @ 2009-02-24 14:40 UTC (permalink / raw) To: Josef 'Jeff' Sipek; +Cc: Christoph Hellwig, xfs On Sun, Feb 22, 2009 at 05:48:41PM -0500, Josef 'Jeff' Sipek wrote: > On Fri, Feb 20, 2009 at 03:52:11AM -0500, Christoph Hellwig wrote: > > Most callers of xlog_bread need to call xlog_align to get the actual offset. > > Consolidate that call into the main xlog_bread and provide a _xlog_bread > > for those few that don't want the actual offset. > > Only one leading underscore? IOW, why not not __xlog_bread? (That's > definitely more Linux-like.) In that deep down xfs code a single underscore is the more common idiom. Of course a descriptive name might be even better :) _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/7] xfs: cleanup xlog_bread 2009-02-20 8:52 ` [PATCH 4/7] xfs: cleanup xlog_bread Christoph Hellwig 2009-02-22 22:48 ` Josef 'Jeff' Sipek @ 2009-03-15 7:53 ` Dave Chinner 1 sibling, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:53 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:11AM -0500, Christoph Hellwig wrote: > Most callers of xlog_bread need to call xlog_align to get the actual offset. > Consolidate that call into the main xlog_bread and provide a _xlog_bread > for those few that don't want the actual offset. > > > Signed-off-by: Christoph Hellwig <hch@lst.de> ..... > * nbblks should be uint, but oh well. Just want to catch that 32-bit length. > */ > -int > -xlog_bread( > +STATIC int > +_xlog_bread( > xlog_t *log, > xfs_daddr_t blk_no, > int nbblks, > @@ -137,6 +155,24 @@ xlog_bread( > return error; > } xlog_bread_noalign(). Otherwise looks good. Consider it: Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 5/7] xfs: kill vn_atime_* helpers. 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig ` (3 preceding siblings ...) 2009-02-20 8:52 ` [PATCH 4/7] xfs: cleanup xlog_bread Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:54 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 6/7] xfs: kill VN_BAD Christoph Hellwig ` (2 subsequent siblings) 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-kill-vn_atime_ --] [-- Type: text/plain, Size: 1920 bytes --] Two out of three are unused already, and the third is better done open-coded with a comment describing what's going on here. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2009-02-03 17:38:26.016436576 +0100 +++ xfs/fs/xfs/linux-2.6/xfs_vnode.h 2009-02-03 17:40:13.809477409 +0100 @@ -58,25 +58,6 @@ static inline int VN_BAD(struct inode *v } /* - * Extracting atime values in various formats - */ -static inline void vn_atime_to_bstime(struct inode *vp, xfs_bstime_t *bs_atime) -{ - bs_atime->tv_sec = vp->i_atime.tv_sec; - bs_atime->tv_nsec = vp->i_atime.tv_nsec; -} - -static inline void vn_atime_to_timespec(struct inode *vp, struct timespec *ts) -{ - *ts = vp->i_atime; -} - -static inline void vn_atime_to_time_t(struct inode *vp, time_t *tt) -{ - *tt = vp->i_atime.tv_sec; -} - -/* * Some useful predicates. */ #define VN_MAPPED(vp) mapping_mapped(vp->i_mapping) Index: xfs/fs/xfs/xfs_itable.c =================================================================== --- xfs.orig/fs/xfs/xfs_itable.c 2009-02-03 17:38:26.035436548 +0100 +++ xfs/fs/xfs/xfs_itable.c 2009-02-03 17:39:41.954562280 +0100 @@ -83,7 +83,12 @@ xfs_bulkstat_one_iget( buf->bs_uid = dic->di_uid; buf->bs_gid = dic->di_gid; buf->bs_size = dic->di_size; - vn_atime_to_bstime(VFS_I(ip), &buf->bs_atime); + /* + * We are reading the atime from the Linux inode because the + * dinode might not be uptodate. + */ + buf->bs_atime.tv_sec = VFS_I(ip)->i_atime.tv_sec; + buf->bs_atime.tv_nsec = VFS_I(ip)->i_atime.tv_nsec; buf->bs_mtime.tv_sec = dic->di_mtime.t_sec; buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec; buf->bs_ctime.tv_sec = dic->di_ctime.t_sec; _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/7] xfs: kill vn_atime_* helpers. 2009-02-20 8:52 ` [PATCH 5/7] xfs: kill vn_atime_* helpers Christoph Hellwig @ 2009-03-15 7:54 ` Dave Chinner 0 siblings, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:54 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:12AM -0500, Christoph Hellwig wrote: > Two out of three are unused already, and the third is better done open-coded > with a comment describing what's going on here. Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 6/7] xfs: kill VN_BAD 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig ` (4 preceding siblings ...) 2009-02-20 8:52 ` [PATCH 5/7] xfs: kill vn_atime_* helpers Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:54 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG Christoph Hellwig 2009-03-16 8:46 ` [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs [-- Attachment #1: xfs-kill-VN_BAD --] [-- Type: text/plain, Size: 1578 bytes --] Remove this rather pointless wrapper and use is_bad_inode directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Index: xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2009-02-03 17:41:55.249436184 +0100 +++ xfs/fs/xfs/linux-2.6/xfs_vnode.h 2009-02-03 17:42:24.938561825 +0100 @@ -50,14 +50,6 @@ struct attrlist_cursor_kern; the operation completes. */ /* - * Dealing with bad inodes - */ -static inline int VN_BAD(struct inode *vp) -{ - return is_bad_inode(vp); -} - -/* * Some useful predicates. */ #define VN_MAPPED(vp) mapping_mapped(vp->i_mapping) Index: xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- xfs.orig/fs/xfs/xfs_vnodeops.c 2009-02-03 17:41:55.261436104 +0100 +++ xfs/fs/xfs/xfs_vnodeops.c 2009-02-03 17:42:10.690562980 +0100 @@ -1136,7 +1136,7 @@ xfs_inactive( * If the inode is already free, then there can be nothing * to clean up here. */ - if (ip->i_d.di_mode == 0 || VN_BAD(VFS_I(ip))) { + if (ip->i_d.di_mode == 0 || is_bad_inode(VFS_I(ip))) { ASSERT(ip->i_df.if_real_bytes == 0); ASSERT(ip->i_df.if_broot_bytes == 0); return VN_INACTIVE_CACHE; @@ -2448,7 +2448,7 @@ xfs_reclaim( ASSERT(!VN_MAPPED(VFS_I(ip))); /* bad inode, get out here ASAP */ - if (VN_BAD(VFS_I(ip))) { + if (is_bad_inode(VFS_I(ip))) { xfs_ireclaim(ip); return 0; } _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 6/7] xfs: kill VN_BAD 2009-02-20 8:52 ` [PATCH 6/7] xfs: kill VN_BAD Christoph Hellwig @ 2009-03-15 7:54 ` Dave Chinner 0 siblings, 0 replies; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:54 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Fri, Feb 20, 2009 at 03:52:13AM -0500, Christoph Hellwig wrote: > Remove this rather pointless wrapper and use is_bad_inode directly. Reviewed-by: Dave Chinner <david@fromorbit.com> -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig ` (5 preceding siblings ...) 2009-02-20 8:52 ` [PATCH 6/7] xfs: kill VN_BAD Christoph Hellwig @ 2009-02-20 8:52 ` Christoph Hellwig 2009-03-15 7:58 ` Dave Chinner 2009-03-16 8:46 ` [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-02-20 8:52 UTC (permalink / raw) To: xfs; +Cc: Dave Chinner [-- Attachment #1: xfs-factor-pag-freelist-check-2 --] [-- Type: text/plain, Size: 4386 bytes --] From: Dave Chinner <dgc@sgi.com> Signed-off-by: Dave Chinner <dgc@sgi.com> Index: xfs/fs/xfs/xfs_alloc.c =================================================================== --- xfs.orig/fs/xfs/xfs_alloc.c 2009-02-15 19:40:08.270069722 +0100 +++ xfs/fs/xfs/xfs_alloc.c 2009-02-15 22:50:10.763069641 +0100 @@ -1872,6 +1872,25 @@ xfs_alloc_compute_maxlevels( } /* + * Find the length of the longest extent in an AG. + */ +xfs_extlen_t +xfs_alloc_min_freelist( + struct xfs_mount *mp, + struct xfs_perag *pag) +{ + xfs_extlen_t need, delta = 0; + + need = XFS_MIN_FREELIST_PAG(pag, mp); + if (need > pag->pagf_flcount) + delta = need - pag->pagf_flcount; + + if (pag->pagf_longest > delta) + return pag->pagf_longest - delta; + return pag->pagf_flcount > 0 || pag->pagf_longest > 0; +} + +/* * Decide whether to use this allocation group for this allocation. * If so, fix up the btree freelist's size. */ @@ -1923,15 +1942,12 @@ xfs_alloc_fix_freelist( } if (!(flags & XFS_ALLOC_FLAG_FREEING)) { - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; /* * If it looks like there isn't a long enough extent, or enough * total blocks, reject it. */ - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); + need = XFS_MIN_FREELIST_PAG(pag, mp); + longest = xfs_alloc_min_freelist(mp, pag); if ((args->minlen + args->alignment + args->minalignslop - 1) > longest || ((int)(pag->pagf_freeblks + pag->pagf_flcount - Index: xfs/fs/xfs/xfs_alloc.h =================================================================== --- xfs.orig/fs/xfs/xfs_alloc.h 2009-02-08 21:51:06.553944398 +0100 +++ xfs/fs/xfs/xfs_alloc.h 2009-02-15 22:47:48.470968077 +0100 @@ -100,6 +100,12 @@ typedef struct xfs_alloc_arg { #define XFS_ALLOC_USERDATA 1 /* allocation is for user data*/ #define XFS_ALLOC_INITIAL_USER_DATA 2 /* special case start of file */ +/* + * Find the length of the longest extent in an AG. + */ +xfs_extlen_t +xfs_alloc_min_freelist(struct xfs_mount *mp, + struct xfs_perag *pag); #ifdef __KERNEL__ Index: xfs/fs/xfs/xfs_bmap.c =================================================================== --- xfs.orig/fs/xfs/xfs_bmap.c 2009-02-15 19:40:08.724068781 +0100 +++ xfs/fs/xfs/xfs_bmap.c 2009-02-15 22:47:48.478974193 +0100 @@ -2712,9 +2712,6 @@ xfs_bmap_btalloc( xfs_agnumber_t startag; xfs_alloc_arg_t args; xfs_extlen_t blen; - xfs_extlen_t delta; - xfs_extlen_t longest; - xfs_extlen_t need; xfs_extlen_t nextminlen = 0; xfs_perag_t *pag; int nullfb; /* true if ap->firstblock isn't set */ @@ -2796,13 +2793,8 @@ xfs_bmap_btalloc( * See xfs_alloc_fix_freelist... */ if (pag->pagf_init) { - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? - need - pag->pagf_flcount : 0; - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || - pag->pagf_longest > 0); + xfs_extlen_t longest; + longest = xfs_alloc_min_freelist(mp, pag); if (blen < longest) blen = longest; } else Index: xfs/fs/xfs/xfs_filestream.c =================================================================== --- xfs.orig/fs/xfs/xfs_filestream.c 2009-02-08 21:51:06.575944685 +0100 +++ xfs/fs/xfs/xfs_filestream.c 2009-02-15 22:47:48.479944079 +0100 @@ -140,7 +140,7 @@ _xfs_filestream_pick_ag( xfs_extlen_t minlen) { int err, trylock, nscan; - xfs_extlen_t delta, longest, need, free, minfree, maxfree = 0; + xfs_extlen_t longest, free, minfree, maxfree = 0; xfs_agnumber_t ag, max_ag = NULLAGNUMBER; struct xfs_perag *pag; @@ -186,12 +186,7 @@ _xfs_filestream_pick_ag( goto next_ag; } - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); - + longest = xfs_alloc_min_freelist(mp, pag); if (((minlen && longest >= minlen) || (!minlen && pag->pagf_freeblks >= minfree)) && (!pag->pagf_metadata || !(flags & XFS_PICK_USERDATA) || _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG 2009-02-20 8:52 ` [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG Christoph Hellwig @ 2009-03-15 7:58 ` Dave Chinner 2009-03-16 7:27 ` Christoph Hellwig 0 siblings, 1 reply; 20+ messages in thread From: Dave Chinner @ 2009-03-15 7:58 UTC (permalink / raw) To: Christoph Hellwig; +Cc: Dave Chinner, xfs On Fri, Feb 20, 2009 at 03:52:14AM -0500, Christoph Hellwig wrote: > From: Dave Chinner <dgc@sgi.com> > > Signed-off-by: Dave Chinner <dgc@sgi.com> .... > /* > + * Find the length of the longest extent in an AG. > + */ > +xfs_extlen_t > +xfs_alloc_min_freelist( > + struct xfs_mount *mp, > + struct xfs_perag *pag) Looking at this again, I'd change the name of this function to xfs_alloc_ag_longest_free_extent(), because that is what it is actually returning.... Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG 2009-03-15 7:58 ` Dave Chinner @ 2009-03-16 7:27 ` Christoph Hellwig 0 siblings, 0 replies; 20+ messages in thread From: Christoph Hellwig @ 2009-03-16 7:27 UTC (permalink / raw) To: Christoph Hellwig, xfs, Dave Chinner On Sun, Mar 15, 2009 at 06:58:24PM +1100, Dave Chinner wrote: > > Looking at this again, I'd change the name of this function > to xfs_alloc_ag_longest_free_extent(), because that is what it > is actually returning.... I've left the _ag out and made it xfs_alloc_longest_free_extent. The ag is kinda implicit by the perag argument.. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] a couple more random cleanups for 2.6.30 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig ` (6 preceding siblings ...) 2009-02-20 8:52 ` [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG Christoph Hellwig @ 2009-03-16 8:46 ` Christoph Hellwig 2009-03-16 20:55 ` Felix Blyakher 7 siblings, 1 reply; 20+ messages in thread From: Christoph Hellwig @ 2009-03-16 8:46 UTC (permalink / raw) To: xfs All patches are now available to pull from git://git.kernel.org/pub/scm/fs/xfs/xfs.git with the minor review comments from Dave incorporated. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] a couple more random cleanups for 2.6.30 2009-03-16 8:46 ` [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig @ 2009-03-16 20:55 ` Felix Blyakher 0 siblings, 0 replies; 20+ messages in thread From: Felix Blyakher @ 2009-03-16 20:55 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Mar 16, 2009, at 3:46 AM, Christoph Hellwig wrote: > All patches are now available to pull from > > git://git.kernel.org/pub/scm/fs/xfs/xfs.git I pushed them to oss this morning. Felix > > > with the minor review comments from Dave incorporated. > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2009-03-16 22:01 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-20 8:52 [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 2009-02-20 8:52 ` [PATCH 1/7] xfs: cleanup log unmount handling Christoph Hellwig 2009-03-15 7:49 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 2/7] xfs: remove another leftover of the old inode log item format Christoph Hellwig 2009-03-15 7:49 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 3/7] xfs: cleanup xlog_recover_do_trans Christoph Hellwig 2009-03-15 7:50 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 4/7] xfs: cleanup xlog_bread Christoph Hellwig 2009-02-22 22:48 ` Josef 'Jeff' Sipek 2009-02-24 14:40 ` Christoph Hellwig 2009-03-15 7:53 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 5/7] xfs: kill vn_atime_* helpers Christoph Hellwig 2009-03-15 7:54 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 6/7] xfs: kill VN_BAD Christoph Hellwig 2009-03-15 7:54 ` Dave Chinner 2009-02-20 8:52 ` [PATCH 7/7] xfs: factor out code to find the longest free extent in the AG Christoph Hellwig 2009-03-15 7:58 ` Dave Chinner 2009-03-16 7:27 ` Christoph Hellwig 2009-03-16 8:46 ` [PATCH 0/7] a couple more random cleanups for 2.6.30 Christoph Hellwig 2009-03-16 20:55 ` Felix Blyakher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox