All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Update device mod time fixes
@ 2021-10-14 17:10 Josef Bacik
  2021-10-14 17:11 ` [PATCH v2 1/2] fs: export an inode_update_time helper Josef Bacik
  2021-10-14 17:11 ` [PATCH v2 2/2] btrfs: update device path inode time instead of bd_inode Josef Bacik
  0 siblings, 2 replies; 6+ messages in thread
From: Josef Bacik @ 2021-10-14 17:10 UTC (permalink / raw)
  To: hch, linux-btrfs, kernel-team

Hello,

Christoph noticed that my original fix to stop calling filp_open() when we
remove devices was wrong because ->bd_inode isn't the inode we need to be
update, it needs to be the inode that is associated with the path to the device
node.

In order to do this I need to do a kern_path() to lookup the path to that inode,
and then I need to update the time for that inode.  generic_update_time() isn't
appropriate here as it should be used by ->update_time() if at all.  Instead
export a inode_update_time() helper to do the correct thing, and use that.

This allows us to update the time properly for libblkid, and makes sure we still
have the lockdep fix that was the motivation of the original fix.  Thanks,


Josef Bacik (2):
  fs: export an inode_update_time helper
  btrfs: update device path inode time instead of bd_inode

 fs/btrfs/volumes.c | 21 +++++++++++++--------
 fs/inode.c         |  7 ++++---
 include/linux/fs.h |  2 ++
 3 files changed, 19 insertions(+), 11 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2021-10-25 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 17:10 [PATCH v2 0/2] Update device mod time fixes Josef Bacik
2021-10-14 17:11 ` [PATCH v2 1/2] fs: export an inode_update_time helper Josef Bacik
2021-10-21 16:38   ` David Sterba
2021-10-25  7:45     ` Christoph Hellwig
2021-10-25 17:36       ` David Sterba
2021-10-14 17:11 ` [PATCH v2 2/2] btrfs: update device path inode time instead of bd_inode Josef Bacik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.