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

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

Merge tag 'for-linus-v3.10-rc4' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Ben Myers:
 - Fix nested transactions in xfs_qm_scall_setqlim
 - Clear suid/sgid bits when we truncate with size update
 - Fix recovery for split buffers
 - Fix block count on remote symlinks
 - Add fsgeom flag for v5 superblock support
 - Disable XFS_IOC_SWAPEXT for CRC enabled filesystems
 - Fix dirv3 freespace block corruption

* tag 'for-linus-v3.10-rc4' of git://oss.sgi.com/xfs/xfs:
  xfs: fix dir3 freespace block corruption
  xfs: disable swap extents ioctl on CRC enabled filesystems
  xfs: add fsgeom flag for v5 superblock support.
  xfs: fix incorrect remote symlink block count
  xfs: fix split buffer vector log recovery support
  xfs: kill suid/sgid through the truncate path.
  xfs: avoid nesting transactions in xfs_qm_scall_setqlim()
parents 977b55cf e400d27d
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -262,12 +262,7 @@ xfs_buf_item_format_segment(
			vecp->i_addr = xfs_buf_offset(bp, buffer_offset);
			vecp->i_len = nbits * XFS_BLF_CHUNK;
			vecp->i_type = XLOG_REG_TYPE_BCHUNK;
/*
 * You would think we need to bump the nvecs here too, but we do not
 * this number is used by recovery, and it gets confused by the boundary
 * split here
 *			nvecs++;
 */
			nvecs++;
			vecp++;
			first_bit = next_bit;
			last_bit = next_bit;
+8 −0
Original line number Diff line number Diff line
@@ -219,6 +219,14 @@ xfs_swap_extents(
	int		taforkblks = 0;
	__uint64_t	tmp;

	/*
	 * We have no way of updating owner information in the BMBT blocks for
	 * each inode on CRC enabled filesystems, so to avoid corrupting the
	 * this metadata we simply don't allow extent swaps to occur.
	 */
	if (xfs_sb_version_hascrc(&mp->m_sb))
		return XFS_ERROR(EINVAL);

	tempifp = kmem_alloc(sizeof(xfs_ifork_t), KM_MAYFAIL);
	if (!tempifp) {
		error = XFS_ERROR(ENOMEM);
+1 −0
Original line number Diff line number Diff line
@@ -715,6 +715,7 @@ struct xfs_dir3_free_hdr {
	__be32			firstdb;	/* db of first entry */
	__be32			nvalid;		/* count of valid entries */
	__be32			nused;		/* count of used entries */
	__be32			pad;		/* 64 bit alignment. */
};

struct xfs_dir3_free {
+6 −7
Original line number Diff line number Diff line
@@ -263,18 +263,19 @@ xfs_dir3_free_get_buf(
	 * Initialize the new block to be empty, and remember
	 * its first slot as our empty slot.
	 */
	hdr.magic = XFS_DIR2_FREE_MAGIC;
	hdr.firstdb = 0;
	hdr.nused = 0;
	hdr.nvalid = 0;
	memset(bp->b_addr, 0, sizeof(struct xfs_dir3_free_hdr));
	memset(&hdr, 0, sizeof(hdr));

	if (xfs_sb_version_hascrc(&mp->m_sb)) {
		struct xfs_dir3_free_hdr *hdr3 = bp->b_addr;

		hdr.magic = XFS_DIR3_FREE_MAGIC;

		hdr3->hdr.blkno = cpu_to_be64(bp->b_bn);
		hdr3->hdr.owner = cpu_to_be64(dp->i_ino);
		uuid_copy(&hdr3->hdr.uuid, &mp->m_sb.sb_uuid);
	}
	} else
		hdr.magic = XFS_DIR2_FREE_MAGIC;
	xfs_dir3_free_hdr_to_disk(bp->b_addr, &hdr);
	*bpp = bp;
	return 0;
@@ -1921,8 +1922,6 @@ xfs_dir2_node_addname_int(
			 */
			freehdr.firstdb = (fbno - XFS_DIR2_FREE_FIRSTDB(mp)) *
					xfs_dir3_free_max_bests(mp);
			free->hdr.nvalid = 0;
			free->hdr.nused = 0;
		} else {
			free = fbp->b_addr;
			bests = xfs_dir3_free_bests_p(mp, free);
+1 −0
Original line number Diff line number Diff line
@@ -236,6 +236,7 @@ typedef struct xfs_fsop_resblks {
#define XFS_FSOP_GEOM_FLAGS_PROJID32	0x0800  /* 32-bit project IDs	*/
#define XFS_FSOP_GEOM_FLAGS_DIRV2CI	0x1000	/* ASCII only CI names	*/
#define XFS_FSOP_GEOM_FLAGS_LAZYSB	0x4000	/* lazy superblock counters */
#define XFS_FSOP_GEOM_FLAGS_V5SB	0x8000	/* version 5 superblock */


/*
Loading