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

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

Merge tag 'xfs-for-linus-3.17-rc1' of git://oss.sgi.com/xfs/xfs

Pull xfs update from Dave Chinner:
 "This update contains:
   - conversion of the XFS core to pass negative error numbers
   - restructing of core XFS code that is shared with userspace to
     fs/xfs/libxfs
   - introduction of sysfs interface for XFS
   - bulkstat refactoring
   - demand driven speculative preallocation removal
   - XFS now always requires 64 bit sectors to be configured
   - metadata verifier changes to ensure CRCs are calculated during log
     recovery
   - various minor code cleanups
   - miscellaneous bug fixes

  The diffstat is kind of noisy because of the restructuring of the code
  to make kernel/userspace code sharing simpler, along with the XFS wide
  change to use the standard negative error return convention (at last!)"

* tag 'xfs-for-linus-3.17-rc1' of git://oss.sgi.com/xfs/xfs: (45 commits)
  xfs: fix coccinelle warnings
  xfs: flush both inodes in xfs_swap_extents
  xfs: fix swapext ilock deadlock
  xfs: kill xfs_vnode.h
  xfs: kill VN_MAPPED
  xfs: kill VN_CACHED
  xfs: kill VN_DIRTY()
  xfs: dquot recovery needs verifiers
  xfs: quotacheck leaves dquot buffers without verifiers
  xfs: ensure verifiers are attached to recovered buffers
  xfs: catch buffers written without verifiers attached
  xfs: avoid false quotacheck after unclean shutdown
  xfs: fix rounding error of fiemap length parameter
  xfs: introduce xfs_bulkstat_ag_ichunk
  xfs: require 64-bit sector_t
  xfs: fix uflags detection at xfs_fs_rm_xquota
  xfs: remove XFS_IS_OQUOTA_ON macros
  xfs: tidy up xfs_set_inode32
  xfs: allow inode allocations in post-growfs disk space
  xfs: mark xfs_qm_quotacheck as static
  ...
parents cec99709 645f9857
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
What:		/sys/fs/xfs/<disk>/log/log_head_lsn
Date:		July 2014
KernelVersion:	3.17
Contact:	xfs@oss.sgi.com
Description:
		The log sequence number (LSN) of the current head of the
		log. The LSN is exported in "cycle:basic block" format.
Users:		xfstests

What:		/sys/fs/xfs/<disk>/log/log_tail_lsn
Date:		July 2014
KernelVersion:	3.17
Contact:	xfs@oss.sgi.com
Description:
		The log sequence number (LSN) of the current tail of the
		log. The LSN is exported in "cycle:basic block" format.

What:		/sys/fs/xfs/<disk>/log/reserve_grant_head
Date:		July 2014
KernelVersion:	3.17
Contact:	xfs@oss.sgi.com
Description:
		The current state of the log reserve grant head. It
		represents the total log reservation of all currently
		outstanding transactions. The grant head is exported in
		"cycle:bytes" format.
Users:		xfstests

What:		/sys/fs/xfs/<disk>/log/write_grant_head
Date:		July 2014
KernelVersion:	3.17
Contact:	xfs@oss.sgi.com
Description:
		The current state of the log write grant head. It
		represents the total log reservation of all currently
		oustanding transactions, including regrants due to
		rolling transactions. The grant head is exported in
		"cycle:bytes" format.
Users:		xfstests
+1 −0
Original line number Diff line number Diff line
config XFS_FS
	tristate "XFS filesystem support"
	depends on BLOCK
	depends on (64BIT || LBDAF)
	select EXPORTFS
	select LIBCRC32C
	help
+39 −32
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#

ccflags-y += -I$(src)			# needed for trace events
ccflags-y += -I$(src)/libxfs

ccflags-$(CONFIG_XFS_DEBUG) += -g

@@ -25,6 +26,39 @@ obj-$(CONFIG_XFS_FS) += xfs.o
# this one should be compiled first, as the tracing macros can easily blow up
xfs-y				+= xfs_trace.o

# build the libxfs code first
xfs-y				+= $(addprefix libxfs/, \
				   xfs_alloc.o \
				   xfs_alloc_btree.o \
				   xfs_attr.o \
				   xfs_attr_leaf.o \
				   xfs_attr_remote.o \
				   xfs_bmap.o \
				   xfs_bmap_btree.o \
				   xfs_btree.o \
				   xfs_da_btree.o \
				   xfs_da_format.o \
				   xfs_dir2.o \
				   xfs_dir2_block.o \
				   xfs_dir2_data.o \
				   xfs_dir2_leaf.o \
				   xfs_dir2_node.o \
				   xfs_dir2_sf.o \
				   xfs_dquot_buf.o \
				   xfs_ialloc.o \
				   xfs_ialloc_btree.o \
				   xfs_inode_fork.o \
				   xfs_inode_buf.o \
				   xfs_log_rlimit.o \
				   xfs_sb.o \
				   xfs_symlink_remote.o \
				   xfs_trans_resv.o \
				   )
# xfs_rtbitmap is shared with libxfs
xfs-$(CONFIG_XFS_RT)		+= $(addprefix libxfs/, \
				   xfs_rtbitmap.o \
				   )

# highlevel code
xfs-y				+= xfs_aops.o \
				   xfs_attr_inactive.o \
@@ -45,53 +79,27 @@ xfs-y += xfs_aops.o \
				   xfs_ioctl.o \
				   xfs_iomap.o \
				   xfs_iops.o \
				   xfs_inode.o \
				   xfs_itable.o \
				   xfs_message.o \
				   xfs_mount.o \
				   xfs_mru_cache.o \
				   xfs_super.o \
				   xfs_symlink.o \
				   xfs_sysfs.o \
				   xfs_trans.o \
				   xfs_xattr.o \
				   kmem.o \
				   uuid.o

# code shared with libxfs
xfs-y				+= xfs_alloc.o \
				   xfs_alloc_btree.o \
				   xfs_attr.o \
				   xfs_attr_leaf.o \
				   xfs_attr_remote.o \
				   xfs_bmap.o \
				   xfs_bmap_btree.o \
				   xfs_btree.o \
				   xfs_da_btree.o \
				   xfs_da_format.o \
				   xfs_dir2.o \
				   xfs_dir2_block.o \
				   xfs_dir2_data.o \
				   xfs_dir2_leaf.o \
				   xfs_dir2_node.o \
				   xfs_dir2_sf.o \
				   xfs_dquot_buf.o \
				   xfs_ialloc.o \
				   xfs_ialloc_btree.o \
				   xfs_icreate_item.o \
				   xfs_inode.o \
				   xfs_inode_fork.o \
				   xfs_inode_buf.o \
				   xfs_log_recover.o \
				   xfs_log_rlimit.o \
				   xfs_sb.o \
				   xfs_symlink_remote.o \
				   xfs_trans_resv.o

# low-level transaction/log code
xfs-y				+= xfs_log.o \
				   xfs_log_cil.o \
				   xfs_buf_item.o \
				   xfs_extfree_item.o \
				   xfs_icreate_item.o \
				   xfs_inode_item.o \
				   xfs_log_recover.o \
				   xfs_trans_ail.o \
				   xfs_trans_buf.o \
				   xfs_trans_extfree.o \
@@ -107,8 +115,7 @@ xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
				   xfs_quotaops.o

# xfs_rtbitmap is shared with libxfs
xfs-$(CONFIG_XFS_RT)		+= xfs_rtalloc.o \
				   xfs_rtbitmap.o
xfs-$(CONFIG_XFS_RT)		+= xfs_rtalloc.o

xfs-$(CONFIG_XFS_POSIX_ACL)	+= xfs_acl.o
xfs-$(CONFIG_PROC_FS)		+= xfs_stats.o
+0 −0

File moved.

+10 −10
Original line number Diff line number Diff line
@@ -483,9 +483,9 @@ xfs_agfl_read_verify(
		return;

	if (!xfs_buf_verify_cksum(bp, XFS_AGFL_CRC_OFF))
		xfs_buf_ioerror(bp, EFSBADCRC);
		xfs_buf_ioerror(bp, -EFSBADCRC);
	else if (!xfs_agfl_verify(bp))
		xfs_buf_ioerror(bp, EFSCORRUPTED);
		xfs_buf_ioerror(bp, -EFSCORRUPTED);

	if (bp->b_error)
		xfs_verifier_error(bp);
@@ -503,7 +503,7 @@ xfs_agfl_write_verify(
		return;

	if (!xfs_agfl_verify(bp)) {
		xfs_buf_ioerror(bp, EFSCORRUPTED);
		xfs_buf_ioerror(bp, -EFSCORRUPTED);
		xfs_verifier_error(bp);
		return;
	}
@@ -559,7 +559,7 @@ xfs_alloc_update_counters(
	xfs_trans_agblocks_delta(tp, len);
	if (unlikely(be32_to_cpu(agf->agf_freeblks) >
		     be32_to_cpu(agf->agf_length)))
		return EFSCORRUPTED;
		return -EFSCORRUPTED;

	xfs_alloc_log_agf(tp, agbp, XFS_AGF_FREEBLKS);
	return 0;
@@ -2234,11 +2234,11 @@ xfs_agf_read_verify(

	if (xfs_sb_version_hascrc(&mp->m_sb) &&
	    !xfs_buf_verify_cksum(bp, XFS_AGF_CRC_OFF))
		xfs_buf_ioerror(bp, EFSBADCRC);
		xfs_buf_ioerror(bp, -EFSBADCRC);
	else if (XFS_TEST_ERROR(!xfs_agf_verify(mp, bp), mp,
				XFS_ERRTAG_ALLOC_READ_AGF,
				XFS_RANDOM_ALLOC_READ_AGF))
		xfs_buf_ioerror(bp, EFSCORRUPTED);
		xfs_buf_ioerror(bp, -EFSCORRUPTED);

	if (bp->b_error)
		xfs_verifier_error(bp);
@@ -2252,7 +2252,7 @@ xfs_agf_write_verify(
	struct xfs_buf_log_item	*bip = bp->b_fspriv;

	if (!xfs_agf_verify(mp, bp)) {
		xfs_buf_ioerror(bp, EFSCORRUPTED);
		xfs_buf_ioerror(bp, -EFSCORRUPTED);
		xfs_verifier_error(bp);
		return;
	}
@@ -2601,11 +2601,11 @@ xfs_free_extent(
	 */
	args.agno = XFS_FSB_TO_AGNO(args.mp, bno);
	if (args.agno >= args.mp->m_sb.sb_agcount)
		return EFSCORRUPTED;
		return -EFSCORRUPTED;

	args.agbno = XFS_FSB_TO_AGBNO(args.mp, bno);
	if (args.agbno >= args.mp->m_sb.sb_agblocks)
		return EFSCORRUPTED;
		return -EFSCORRUPTED;

	args.pag = xfs_perag_get(args.mp, args.agno);
	ASSERT(args.pag);
@@ -2617,7 +2617,7 @@ xfs_free_extent(
	/* validate the extent size is legal now we have the agf locked */
	if (args.agbno + len >
			be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)) {
		error = EFSCORRUPTED;
		error = -EFSCORRUPTED;
		goto error0;
	}

Loading