Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bea4c899 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  XFS: Free buffer pages array unconditionally
  xfs: kill xfs_bmbt_rec_32/64 types
  xfs: improve metadata I/O merging in the elevator
  xfs: check for not fully initialized inodes in xfs_ireclaim
parents 73efc468 3fc98b1a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -292,6 +292,7 @@ _xfs_buf_free_pages(
{
	if (bp->b_pages != bp->b_page_array) {
		kmem_free(bp->b_pages);
		bp->b_pages = NULL;
	}
}

@@ -323,9 +324,8 @@ xfs_buf_free(
				ASSERT(!PagePrivate(page));
			page_cache_release(page);
		}
		_xfs_buf_free_pages(bp);
	}

	_xfs_buf_free_pages(bp);
	xfs_buf_deallocate(bp);
}

@@ -1149,10 +1149,14 @@ _xfs_buf_ioapply(
	if (bp->b_flags & XBF_ORDERED) {
		ASSERT(!(bp->b_flags & XBF_READ));
		rw = WRITE_BARRIER;
	} else if (bp->b_flags & _XBF_RUN_QUEUES) {
	} else if (bp->b_flags & XBF_LOG_BUFFER) {
		ASSERT(!(bp->b_flags & XBF_READ_AHEAD));
		bp->b_flags &= ~_XBF_RUN_QUEUES;
		rw = (bp->b_flags & XBF_WRITE) ? WRITE_SYNC : READ_SYNC;
	} else if (bp->b_flags & _XBF_RUN_QUEUES) {
		ASSERT(!(bp->b_flags & XBF_READ_AHEAD));
		bp->b_flags &= ~_XBF_RUN_QUEUES;
		rw = (bp->b_flags & XBF_WRITE) ? WRITE_META : READ_META;
	} else {
		rw = (bp->b_flags & XBF_WRITE) ? WRITE :
		     (bp->b_flags & XBF_READ_AHEAD) ? READA : READ;
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ typedef enum {
	XBF_FS_MANAGED = (1 << 8),  /* filesystem controls freeing memory  */
 	XBF_ORDERED = (1 << 11),    /* use ordered writes		   */
	XBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead		   */
	XBF_LOG_BUFFER = (1 << 13), /* this is a buffer used for the log   */

	/* flags used only as arguments to access routines */
	XBF_LOCK = (1 << 14),       /* lock requested			   */
+3 −11
Original line number Diff line number Diff line
@@ -46,20 +46,12 @@ typedef struct xfs_bmdr_block {
#define BMBT_STARTBLOCK_BITLEN	52
#define BMBT_BLOCKCOUNT_BITLEN	21


#define BMBT_USE_64	1

typedef struct xfs_bmbt_rec_32
{
	__uint32_t		l0, l1, l2, l3;
} xfs_bmbt_rec_32_t;
typedef struct xfs_bmbt_rec_64
{
typedef struct xfs_bmbt_rec {
	__be64			l0, l1;
} xfs_bmbt_rec_64_t;
} xfs_bmbt_rec_t;

typedef __uint64_t	xfs_bmbt_rec_base_t;	/* use this for casts */
typedef xfs_bmbt_rec_64_t xfs_bmbt_rec_t, xfs_bmdr_rec_t;
typedef xfs_bmbt_rec_t xfs_bmdr_rec_t;

typedef struct xfs_bmbt_rec_host {
	__uint64_t		l0, l1;
+8 −4
Original line number Diff line number Diff line
@@ -478,17 +478,21 @@ xfs_ireclaim(
{
	struct xfs_mount	*mp = ip->i_mount;
	struct xfs_perag	*pag;
	xfs_agino_t		agino = XFS_INO_TO_AGINO(mp, ip->i_ino);

	XFS_STATS_INC(xs_ig_reclaims);

	/*
	 * Remove the inode from the per-AG radix tree.  It doesn't matter
	 * if it was never added to it because radix_tree_delete can deal
	 * with that case just fine.
	 * Remove the inode from the per-AG radix tree.
	 *
	 * Because radix_tree_delete won't complain even if the item was never
	 * added to the tree assert that it's been there before to catch
	 * problems with the inode life time early on.
	 */
	pag = xfs_get_perag(mp, ip->i_ino);
	write_lock(&pag->pag_ici_lock);
	radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino));
	if (!radix_tree_delete(&pag->pag_ici_root, agino))
		ASSERT(0);
	write_unlock(&pag->pag_ici_lock);
	xfs_put_perag(mp, pag);

+3 −3
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static inline int xfs_ilog_fdata(int w)
#ifdef __KERNEL__

struct xfs_buf;
struct xfs_bmbt_rec_64;
struct xfs_bmbt_rec;
struct xfs_inode;
struct xfs_mount;

@@ -140,9 +140,9 @@ typedef struct xfs_inode_log_item {
	unsigned short		ili_flags;	   /* misc flags */
	unsigned short		ili_logged;	   /* flushed logged data */
	unsigned int		ili_last_fields;   /* fields when flushed */
	struct xfs_bmbt_rec_64	*ili_extents_buf;  /* array of logged
	struct xfs_bmbt_rec	*ili_extents_buf;  /* array of logged
						      data exts */
	struct xfs_bmbt_rec_64	*ili_aextents_buf; /* array of logged
	struct xfs_bmbt_rec	*ili_aextents_buf; /* array of logged
						      attr exts */
	unsigned int            ili_pushbuf_flag;  /* one bit used in push_ail */

Loading