LU-18109 nodemap: fix idmap offset for root
root must be mapped and offset just like other ids, so that all ids on
the client in the range [0, offset_limit-1] are mapped to the
filesystem id range [offset, offset+offset_limit-1].
This means that as soon as an offset is defined on a nodemap, root is
necessarily mapped:
- if admin=1, root id is offset
- if admin=0, root is squashed then offset.
Similarly:
- if trusted=1, ids are mapped (with any explicit mapping) and offset
- if trusted=0, ids are squashed then offset.
Moreover, add_offset and del_offset operations are only allowed on the
MGS or for a dynamic nodemap.
Finally, enhance sanity-sec test_27ab to test id mappings with offset.
Fixes:
e3051ad0f1 ("LU-18109 utils: adding nodemap offset capability")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7a20c59496174d9d1fc040c5b3b43d8dad3447f9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57856
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>