linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/17] xfs: mount API patch series
@ 2019-10-09 11:30 Ian Kent
  2019-10-09 11:30 ` [PATCH v5 01/17] vfs: Create fs_context-aware mount_bdev() replacement Ian Kent
                   ` (17 more replies)
  0 siblings, 18 replies; 51+ messages in thread
From: Ian Kent @ 2019-10-09 11:30 UTC (permalink / raw)
  To: linux-xfs
  Cc: Brian Foster, Eric Sandeen, David Howells, Dave Chinner, Al Viro

This patch series add support to xfs for the new kernel mount API
as described in the LWN article at https://lwn.net/Articles/780267/.

In the article there's a lengthy description of the reasons for
adopting the API and problems expected to be resolved by using it.

The series has been applied to the repository located at
git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git, and built and
some simple tests run on it along with the generic xfstests.

Other things that continue to cause me concern:

- Message logging.
  There is error logging done in the VFS by the mount-api code, some
  is VFS specific while some is file system specific. This can lead
  to duplicated and sometimes inconsistent logging.

  The mount-api feature of saving error message text to the mount
  context for later retrieval by fsopen()/fsconfig()/fsmount() users
  is the reason the mount-api log macros are present. But, at the
  moment (last time I looked), these macros will either log the
  error message or save it to the mount context. There's not yet
  a way to modify this behaviour so it which can lead to messages,
  possibly needed for debug purposes, not being sent to the kernel
  log. There's also the pr_xxx() log functions (not a problem for
  xfs AFAICS) that aren't aware of the mount context at all.

  In the xfs patches I've used the same method that is used in
  gfs2 and was suggested by Al Viro (essentially return the error
  if fs_parse() returns one) except that I've also not used the
  mount api log macros to minimise the possibility of lost log
  messages.

  This isn't the best so follow up patches for RFC (with a
  slightly wider audience) will be needed to try and improve
  this aspect of the mount api.

Al Viro has sent a pull request to Linus for the patch containing
get_tree_bdev() and it's included in the current Linus rc tree.
I think there's a small problem with that patch too and I've asked
Al to take a look at it.

So the first two patches in the series are needed only for testing
and these two patches need to be dropped before merging.

Changes for v5:
- give error exit label in xfs_fill_super() a sensible name.
- use original comment about options handling in xfs_fs_remount() for
  comment above xfs_reconfigure().
- use a much simpler comment in xfs_fc_free(), thanks to Brian Foster.
- move cover letter comment about the first two patches above the
  revision comentary so it isn't missed.

Changes for v4:
- changed xfs_fill_super() cleanup back to what it was in v2, until
  I can work out what's causing the problem had previously seen (I can't
  reproduce it myself), since it looks like it was right from the start.
- use get_tree_bdev() instead of vfs_get_block_super() in xfs_get_tree()
  as requested by Al Viro.
- removed redundant initialisation in xfs_fs_fill_super().
- fix long line in xfs_validate_params().
- no need to validate if parameter parsing fails, just return the error.
- summarise reconfigure comment about option handling, transfer bulk
  of comment to commit log message.
- use minimal change in xfs_parse_param(), deffer discussion of mount
  api logging improvements until later and with a wider audience.

Changes for v3:
- fix struct xfs_fs_context initialisation in xfs_parseargs().
- move call to xfs_validate_params() below label "done".
- if allocation of xfs_mount fails return ENOMEM immediately.
- remove erroneous kfree(mp) in xfs_fill_super().
- move the removal of xfs_fs_remount() and xfs_test_remount_options()
  to the switch to mount api patch.
- retain original usage of distinct <option>, no<option> usage.
- fix line length and a white space problem in xfs_parseargs().
- defer introduction of struct fs_context_operations until mount
  api implementation.
- don't use a new line for the void parameter of xfs_mount_alloc().
- check for -ENOPARAM in xfs_parse_param() to report invalid options
  using the options switch (to avoid double entry log messages).
- remove obsolete mount option biosize.
- try and make comment in xfs_fc_free() more understandable.

Changes for v2:
- changed .name to uppercase in fs_parameter_description to ensure
  consistent error log messages between the vfs parser and the xfs
  parameter parser.
- clarify comment above xfs_parse_param() about when possibly
  allocated mp->m_logname or mp->m_rtname are freed.
- factor out xfs_remount_rw() and xfs_remount_ro() from  xfs_remount().
- changed xfs_mount_alloc() to not set super block in xfs_mount so it
  can be re-used when switching to the mount-api.
- fixed don't check for NULL when calling kfree() in xfs_fc_free().
- refactored xfs_parseargs() in an attempt to highlight the code
  that actually changes in converting to use the new mount api.
- dropped xfs-mount-api-rename-xfs_fill_super.patch, it didn't seem
  necessary.
- move comment about remount difficulties above xfs_reconfigure()
  and increase line length to try and make the comment manageable.

---

David Howells (1):
      vfs: Create fs_context-aware mount_bdev() replacement

Ian Kent (16):
      vfs: add missing blkdev_put() in get_tree_bdev()
      xfs: remove very old mount option
      xfs: mount-api - add fs parameter description
      xfs: mount-api - refactor suffix_kstrtoint()
      xfs: mount-api - refactor xfs_parseags()
      xfs: mount-api - make xfs_parse_param() take context .parse_param() args
      xfs: mount-api - move xfs_parseargs() validation to a helper
      xfs: mount-api - refactor xfs_fs_fill_super()
      xfs: mount-api - add xfs_get_tree()
      xfs: mount-api - add xfs_remount_rw() helper
      xfs: mount-api - add xfs_remount_ro() helper
      xfs: mount api - add xfs_reconfigure()
      xfs: mount-api - add xfs_fc_free()
      xfs: mount-api - dont set sb in xfs_mount_alloc()
      xfs: mount-api - switch to new mount-api
      xfs: mount-api - remove remaining legacy mount code


 fs/super.c                 |   97 +++++
 fs/xfs/xfs_super.c         |  926 +++++++++++++++++++++++---------------------
 include/linux/fs_context.h |    5 
 3 files changed, 587 insertions(+), 441 deletions(-)

--
Ian

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2019-12-06  8:27 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 11:30 [PATCH v5 00/17] xfs: mount API patch series Ian Kent
2019-10-09 11:30 ` [PATCH v5 01/17] vfs: Create fs_context-aware mount_bdev() replacement Ian Kent
2019-10-09 11:30 ` [PATCH v5 02/17] vfs: add missing blkdev_put() in get_tree_bdev() Ian Kent
2019-10-09 11:30 ` [PATCH v5 03/17] xfs: remove very old mount option Ian Kent
2019-10-09 11:30 ` [PATCH v5 04/17] xfs: mount-api - add fs parameter description Ian Kent
2019-10-09 14:48   ` Christoph Hellwig
2019-10-10  0:56     ` Ian Kent
2019-10-10  6:39       ` Christoph Hellwig
2019-10-10  8:31         ` Ian Kent
2019-10-09 14:53   ` Christoph Hellwig
2019-10-09 11:30 ` [PATCH v5 05/17] xfs: mount-api - refactor suffix_kstrtoint() Ian Kent
2019-10-09 14:48   ` Christoph Hellwig
2019-10-09 15:21     ` Al Viro
2019-10-09 15:29       ` Christoph Hellwig
2019-10-09 16:03         ` Al Viro
2019-10-09 18:01           ` Christoph Hellwig
2019-10-09 18:22             ` Al Viro
2019-12-06  8:27               ` Christoph Hellwig
2019-10-10  0:59     ` Ian Kent
2019-10-09 11:30 ` [PATCH v5 06/17] xfs: mount-api - refactor xfs_parseags() Ian Kent
2019-10-09 14:56   ` Christoph Hellwig
2019-10-10  1:08     ` Ian Kent
2019-10-09 11:30 ` [PATCH v5 07/17] xfs: mount-api - make xfs_parse_param() take context .parse_param() args Ian Kent
2019-10-09 11:30 ` [PATCH v5 08/17] xfs: mount-api - move xfs_parseargs() validation to a helper Ian Kent
2019-10-09 15:02   ` Christoph Hellwig
2019-10-09 19:47     ` Darrick J. Wong
2019-10-10  6:38       ` Christoph Hellwig
2019-10-10  7:57         ` Christoph Hellwig
2019-10-09 11:30 ` [PATCH v5 09/17] xfs: mount-api - refactor xfs_fs_fill_super() Ian Kent
2019-10-09 15:03   ` Christoph Hellwig
2019-10-10  1:10     ` Ian Kent
2019-10-09 11:31 ` [PATCH v5 10/17] xfs: mount-api - add xfs_get_tree() Ian Kent
2019-10-09 15:04   ` Christoph Hellwig
2019-10-10  1:11     ` Ian Kent
2019-10-09 11:31 ` [PATCH v5 11/17] xfs: mount-api - add xfs_remount_rw() helper Ian Kent
2019-10-09 11:31 ` [PATCH v5 12/17] xfs: mount-api - add xfs_remount_ro() helper Ian Kent
2019-10-09 11:31 ` [PATCH v5 13/17] xfs: mount api - add xfs_reconfigure() Ian Kent
2019-10-09 12:51   ` Brian Foster
2019-10-09 15:05   ` Christoph Hellwig
2019-10-10  1:12     ` Ian Kent
2019-10-09 11:31 ` [PATCH v5 14/17] xfs: mount-api - add xfs_fc_free() Ian Kent
2019-10-09 12:51   ` Brian Foster
2019-10-09 11:31 ` [PATCH v5 15/17] xfs: mount-api - dont set sb in xfs_mount_alloc() Ian Kent
2019-10-09 11:31 ` [PATCH v5 16/17] xfs: mount-api - switch to new mount-api Ian Kent
2019-10-09 15:10   ` Christoph Hellwig
2019-10-10  1:15     ` Ian Kent
2019-10-09 11:31 ` [PATCH v5 17/17] xfs: mount-api - remove remaining legacy mount code Ian Kent
2019-10-09 15:10   ` Christoph Hellwig
2019-10-10  1:17     ` Ian Kent
2019-10-09 14:52 ` [PATCH v5 00/17] xfs: mount API patch series Christoph Hellwig
2019-10-14  1:28   ` Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).