Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v4 0/3] btrfs-progs: Fix logical-resolve
@ 2020-11-27 19:30 Marcos Paulo de Souza
  2020-11-27 19:30 ` [PATCH v4 1/3] btrfs-progs: Adapt find_mount_root to verify other fields of mntent struct Marcos Paulo de Souza
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Marcos Paulo de Souza @ 2020-11-27 19:30 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Marcos Paulo de Souza, wqu, dsterba

From: Marcos Paulo de Souza <mpdesouza@suse.com>

In this forth iteration, only patch 0002 was changed. Previously the variable
full_path, which is passed by the user, was being overwritten in the inode loop.
Now we create a temp var to store the mount_point when the lookup is needed.

Please review.

Changes from v3:
* In patch 0002, do not overwrite full_path variable

Changes from v2:
* Make mnt_opts check more strict to avoid bind mounts (Qu)
* Print only inode/subvolume when the subvolume itself is not mounted
* Enhance the test by adding a snapshot (unmounted) to exercise the check above
* Enhance the test by adding a bind mount that would trick logical-resolve

Changes from v1:
* Patches 2 and 3 added
* Test created (David)
* Discard changed on btrfs_list_path_for_root and changing find_mount_root
  instead

Marcos Paulo de Souza (3):
  btrfs-progs: Adapt find_mount_root to verify other fields of mntent
    struct
  btrfs-progs: inspect: Fix logical-resolve file path lookup
  btrfs-progs: tests: Add new logical-resolve test

 cmds/inspect.c                                | 44 +++++++---
 cmds/receive.c                                |  3 +-
 cmds/send.c                                   |  6 +-
 common/utils.c                                | 32 +++++++-
 common/utils.h                                | 11 ++-
 .../test.sh                                   | 81 +++++++++++++++++++
 6 files changed, 160 insertions(+), 17 deletions(-)
 create mode 100755 tests/misc-tests/042-inspect-internal-logical-resolve/test.sh

-- 
2.26.2


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

end of thread, other threads:[~2021-01-14 18:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27 19:30 [PATCH v4 0/3] btrfs-progs: Fix logical-resolve Marcos Paulo de Souza
2020-11-27 19:30 ` [PATCH v4 1/3] btrfs-progs: Adapt find_mount_root to verify other fields of mntent struct Marcos Paulo de Souza
2020-11-27 19:30 ` [PATCH v4 2/3] btrfs-progs: inspect: Fix logical-resolve file path lookup Marcos Paulo de Souza
2020-12-04  0:08   ` Qu Wenruo
2020-11-27 19:30 ` [PATCH v4 3/3] btrfs-progs: tests: Add new logical-resolve test Marcos Paulo de Souza
2020-12-02 20:12 ` [PATCH v4 0/3] btrfs-progs: Fix logical-resolve Josef Bacik
2021-01-14 18:42 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox