[GIT PULL] xfs: new code for 6.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

Please pull this branch with changes for xfs for 6.6-rc1.

We have started merging Online repair feature into upstream kernel. This
pull request also includes a bug fix and a typo fix.

I had performed a test merge with latest contents of
torvalds/linux.git. i.e.

1c59d383390f970b891b503b7f79b63a02db2ec5
Author:     Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
AuthorDate: Mon Aug 28 19:03:24 2023 -0700
Commit:     Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
CommitDate: Mon Aug 28 19:03:24 2023 -0700

Merge tag 'linux-kselftest-nolibc-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest


This resulted in merge conflicts. The following diff should resolve the
resulting merge conflicts.

diff --cc fs/xfs/scrub/scrub.c
index a0fffbcd022bc,e92129d74462b..7d3aa14d81b55
--- a/fs/xfs/scrub/scrub.c
+++ b/fs/xfs/scrub/scrub.c
@@@ -178,16 -178,16 +178,18 @@@ xchk_teardown
  	}
  	if (sc->ip) {
  		if (sc->ilock_flags)
- 			xfs_iunlock(sc->ip, sc->ilock_flags);
- 		if (sc->ip != ip_in &&
- 		    !xfs_internal_inum(sc->mp, sc->ip->i_ino))
- 			xchk_irele(sc, sc->ip);
+ 			xchk_iunlock(sc, sc->ilock_flags);
+ 		xchk_irele(sc, sc->ip);
  		sc->ip = NULL;
  	}
 -	if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)
 +	if (sc->flags & XCHK_HAVE_FREEZE_PROT) {
 +		sc->flags &= ~XCHK_HAVE_FREEZE_PROT;
  		mnt_drop_write_file(sc->file);
 +	}
+ 	if (sc->xfile) {
+ 		xfile_destroy(sc->xfile);
+ 		sc->xfile = NULL;
+ 	}
  	if (sc->buf) {
  		if (sc->buf_cleanup)
  			sc->buf_cleanup(sc->buf);

The final version of xchk_teardown() will be,

STATIC int
xchk_teardown(
	struct xfs_scrub	*sc,
	int			error)
{
	xchk_ag_free(sc, &sc->sa);
	if (sc->tp) {
		if (error == 0 && (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR))
			error = xfs_trans_commit(sc->tp);
		else
			xfs_trans_cancel(sc->tp);
		sc->tp = NULL;
	}
	if (sc->ip) {
		if (sc->ilock_flags)
			xchk_iunlock(sc, sc->ilock_flags);
		xchk_irele(sc, sc->ip);
		sc->ip = NULL;
	}
	if (sc->flags & XCHK_HAVE_FREEZE_PROT) {
		sc->flags &= ~XCHK_HAVE_FREEZE_PROT;
		mnt_drop_write_file(sc->file);
	}
	if (sc->xfile) {
		xfile_destroy(sc->xfile);
		sc->xfile = NULL;
	}
	if (sc->buf) {
		if (sc->buf_cleanup)
			sc->buf_cleanup(sc->buf);
		kvfree(sc->buf);
		sc->buf_cleanup = NULL;
		sc->buf = NULL;
	}

	xchk_fsgates_disable(sc);
	return error;
}

diff --cc fs/xfs/xfs_super.c
index c79eac048456b,09638e8fb4eef..1f77014c6e1ab
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@@ -772,17 -760,7 +774,18 @@@ static voi
  xfs_mount_free(
  	struct xfs_mount	*mp)
  {
 +	/*
 +	 * Free the buftargs here because blkdev_put needs to be called outside
 +	 * of sb->s_umount, which is held around the call to ->put_super.
 +	 */
 +	if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp)
 +		xfs_free_buftarg(mp->m_logdev_targp);
 +	if (mp->m_rtdev_targp)
 +		xfs_free_buftarg(mp->m_rtdev_targp);
 +	if (mp->m_ddev_targp)
 +		xfs_free_buftarg(mp->m_ddev_targp);
 +
+ 	debugfs_remove(mp->m_debugfs);
  	kfree(mp->m_rtname);
  	kfree(mp->m_logname);
  	kmem_free(mp);

The final version of xfs_mount_free() will be,

static void
xfs_mount_free(
	struct xfs_mount	*mp)
{
	/*
	 * Free the buftargs here because blkdev_put needs to be called outside
	 * of sb->s_umount, which is held around the call to ->put_super.
	 */
	if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp)
		xfs_free_buftarg(mp->m_logdev_targp);
	if (mp->m_rtdev_targp)
		xfs_free_buftarg(mp->m_rtdev_targp);
	if (mp->m_ddev_targp)
		xfs_free_buftarg(mp->m_ddev_targp);

	debugfs_remove(mp->m_debugfs);
	kfree(mp->m_rtname);
	kfree(mp->m_logname);
	kmem_free(mp);
}

@@@ -1537,11 -1538,18 +1556,18 @@@ xfs_fs_fill_super
  
  	error = xfs_open_devices(mp);
  	if (error)
 -		goto out_free_names;
 +		return error;
  
+ 	if (xfs_debugfs) {
+ 		mp->m_debugfs = xfs_debugfs_mkdir(mp->m_super->s_id,
+ 						  xfs_debugfs);
+ 	} else {
+ 		mp->m_debugfs = NULL;
+ 	}
+ 
  	error = xfs_init_mount_workqueues(mp);
  	if (error)
 -		goto out_close_devices;
 +		goto out_shutdown_devices;
  
  	error = xfs_init_percpu_counters(mp);
  	if (error)


Please let me know if you encounter any problems.


PS: Darrick will continue to sign relevant tags until the kernel.org
keyring maintainers respond to my request to add my gpg key to the
kernel.org PGP keyring.

Also, Both Darrick and me have been running this branch through QA.
Darrick will probably continue to execute QA tests for the near future
until the keyring has been updated and access to git.kernel.org is
granted to me.

-- 
Chandan

The following changes since commit 2ccdd1b13c591d306f0401d98dedc4bdcd02b421:

  Linux 6.5-rc6 (2023-08-13 11:29:55 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/xfs-6.6-merge-1

for you to fetch changes up to c1950a111dd87604009496e06033ee248c676424:

  fs/xfs: Fix typos in comments (2023-08-18 13:42:43 +0530)

----------------------------------------------------------------
New code for 6.6:

 * Chandan Babu will be taking over as the XFS release manager.  He has
   reviewed all the patches that are in this branch, though I'm signing
   the branch one last time since I'm still technically maintainer. :P
 * Create a maintainer entry profile for XFS in which we lay out the
   various roles that I have played for many years.  Aside from release
   manager, the remaining roles are as yet unfilled.
 * Start merging online repair -- we now have in-memory pageable memory
   for staging btrees, a bunch of pending fixes, and we've started the
   process of refactoring the scrub support code to support more of
   repair.  In particular, reaping of old blocks from damaged structures.
 * Scrub the realtime summary file.
 * Fix a bug where scrub's quota iteration only ever returned the root
   dquot.  Oooops.
 * Fix some typos.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

----------------------------------------------------------------
Chandan Babu R (9):
      Merge tag 'maintainer-transition-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'repair-reap-fixes-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'big-array-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'scrub-usage-stats-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'scrub-rtsummary-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'repair-tweaks-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'repair-force-rebuild-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'repair-agfl-fixes-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA
      Merge tag 'scrub-bmap-fixes-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA

Darrick J. Wong (36):
      docs: add maintainer entry profile for XFS
      MAINTAINERS: drop me as XFS maintainer
      MAINTAINERS: add Chandan Babu as XFS release manager
      xfs: cull repair code that will never get used
      xfs: move the post-repair block reaping code to a separate file
      xfs: only invalidate blocks if we're going to free them
      xfs: only allow reaping of per-AG blocks in xrep_reap_extents
      xfs: use deferred frees to reap old btree blocks
      xfs: rearrange xrep_reap_block to make future code flow easier
      xfs: allow scanning ranges of the buffer cache for live buffers
      xfs: reap large AG metadata extents when possible
      xfs: create a big array data structure
      xfs: use per-AG bitmaps to reap unused AG metadata blocks during repair
      xfs: enable sorting of xfile-backed arrays
      xfs: convert xfarray insertion sort to heapsort using scratchpad memory
      xfs: teach xfile to pass back direct-map pages to caller
      xfs: speed up xfarray sort by sorting xfile page contents directly
      xfs: cache pages used for xfarray quicksort convergence
      xfs: create scaffolding for creating debugfs entries
      xfs: improve xfarray quicksort pivot
      xfs: track usage statistics of online fsck
      xfs: get our own reference to inodes that we want to scrub
      xfs: wrap ilock/iunlock operations on sc->ip
      xfs: move the realtime summary file scrubber to a separate source file
      xfs: always rescan allegedly healthy per-ag metadata after repair
      xfs: implement online scrubbing of rtsummary info
      xfs: don't complain about unfixed metadata when repairs were injected
      xfs: allow the user to cancel repairs before we start writing
      xfs: clear pagf_agflreset when repairing the AGFL
      xfs: allow userspace to rebuild metadata structures
      xfs: fix agf_fllast when repairing an empty AGFL
      xfs: hide xfs_inode_is_allocated in scrub common code
      xfs: rewrite xchk_inode_is_allocated to work properly
      xfs: simplify returns in xchk_bmap
      xfs: don't check reflink iflag state when checking cow fork
      xfs: fix dqiterate thinko

Zizhen Pang (1):
      fs/xfs: Fix typos in comments

 Documentation/filesystems/index.rst                |    1 +
 .../filesystems/xfs-maintainer-entry-profile.rst   |  194 ++++
 .../maintainer/maintainer-entry-profile.rst        |    1 +
 MAINTAINERS                                        |    4 +-
 fs/xfs/Kconfig                                     |   18 +
 fs/xfs/Makefile                                    |   11 +-
 fs/xfs/libxfs/xfs_fs.h                             |    6 +-
 fs/xfs/scrub/agheader_repair.c                     |  101 +-
 fs/xfs/scrub/bitmap.c                              |   78 +-
 fs/xfs/scrub/bitmap.h                              |   10 +-
 fs/xfs/scrub/bmap.c                                |   42 +-
 fs/xfs/scrub/common.c                              |  215 +++-
 fs/xfs/scrub/common.h                              |   39 +-
 fs/xfs/scrub/health.c                              |   10 +
 fs/xfs/scrub/ialloc.c                              |    3 +-
 fs/xfs/scrub/inode.c                               |   11 +-
 fs/xfs/scrub/parent.c                              |    4 +-
 fs/xfs/scrub/quota.c                               |   15 +-
 fs/xfs/scrub/reap.c                                |  498 +++++++++
 fs/xfs/scrub/reap.h                                |   12 +
 fs/xfs/scrub/repair.c                              |  377 ++-----
 fs/xfs/scrub/repair.h                              |   25 +-
 fs/xfs/scrub/rtbitmap.c                            |   48 +-
 fs/xfs/scrub/rtsummary.c                           |  264 +++++
 fs/xfs/scrub/scrub.c                               |   46 +-
 fs/xfs/scrub/scrub.h                               |    4 +
 fs/xfs/scrub/stats.c                               |  405 ++++++++
 fs/xfs/scrub/stats.h                               |   59 ++
 fs/xfs/scrub/trace.c                               |    4 +-
 fs/xfs/scrub/trace.h                               |  391 ++++++-
 fs/xfs/scrub/xfarray.c                             | 1083 ++++++++++++++++++++
 fs/xfs/scrub/xfarray.h                             |  141 +++
 fs/xfs/scrub/xfile.c                               |  420 ++++++++
 fs/xfs/scrub/xfile.h                               |   77 ++
 fs/xfs/xfs_aops.c                                  |    2 +-
 fs/xfs/xfs_buf.c                                   |    9 +-
 fs/xfs/xfs_buf.h                                   |   13 +
 fs/xfs/xfs_dquot.c                                 |    2 +-
 fs/xfs/xfs_icache.c                                |   38 -
 fs/xfs/xfs_icache.h                                |    4 -
 fs/xfs/xfs_linux.h                                 |    1 +
 fs/xfs/xfs_mount.c                                 |    9 +-
 fs/xfs/xfs_mount.h                                 |    4 +
 fs/xfs/xfs_super.c                                 |   53 +-
 fs/xfs/xfs_super.h                                 |    2 +
 fs/xfs/xfs_trace.h                                 |    3 +
 46 files changed, 4109 insertions(+), 648 deletions(-)
 create mode 100644 Documentation/filesystems/xfs-maintainer-entry-profile.rst
 create mode 100644 fs/xfs/scrub/reap.c
 create mode 100644 fs/xfs/scrub/reap.h
 create mode 100644 fs/xfs/scrub/rtsummary.c
 create mode 100644 fs/xfs/scrub/stats.c
 create mode 100644 fs/xfs/scrub/stats.h
 create mode 100644 fs/xfs/scrub/xfarray.c
 create mode 100644 fs/xfs/scrub/xfarray.h
 create mode 100644 fs/xfs/scrub/xfile.c
 create mode 100644 fs/xfs/scrub/xfile.h



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux