Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16791

Modern ZFS constified nvlist* functions breaking zfs_[gs]et_prop_*

Details

    • 9223372036854775807

    Description

      When trying to build lustre against  zfs master tree we get this:

      libmount_utils_zfs.c: In function 'zfs_get_prop_int':
      libmount_utils_zfs.c:491:51: error: passing argument 3 of 'nvlist_lookup_string' from incompatible pointer type [-Werror=incompatible-pointer-types]
        ret = nvlist_lookup_string(propval, ZPROP_VALUE, &propstr);
                                                         ^~~~~~~~ 

      and related

      Attachments

        Issue Links

          Activity

            [LU-16791] Modern ZFS constified nvlist* functions breaking zfs_[gs]et_prop_*

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/54818/
            Subject: LU-16791 utils: ZFS 2.2 const prop args
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set:
            Commit: 0a2d92bf0b2b533c0ddce6bb33cd7f3e25020710

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/54818/ Subject: LU-16791 utils: ZFS 2.2 const prop args Project: fs/lustre-release Branch: b2_15 Current Patch Set: Commit: 0a2d92bf0b2b533c0ddce6bb33cd7f3e25020710

            "Eric Carbonneau <carbonneau1@llnl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/54818
            Subject: LU-16791 utils: ZFS 2.2 const prop args
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set: 1
            Commit: 0bb434eaa1d21a4bdd98e880f8f76eae3b38cd95

            gerrit Gerrit Updater added a comment - "Eric Carbonneau <carbonneau1@llnl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/54818 Subject: LU-16791 utils: ZFS 2.2 const prop args Project: fs/lustre-release Branch: b2_15 Current Patch Set: 1 Commit: 0bb434eaa1d21a4bdd98e880f8f76eae3b38cd95
            akash-b Akash B added a comment -

            There are build failures when it's built against ZFS (master and zfs-2.2-release) builds even after landing LU-16791. Further, LU-17421 is created to fix the build issue for the `arc_prune_func_t` changes.

            akash-b Akash B added a comment - There are build failures when it's built against ZFS (master and zfs-2.2-release) builds even after landing LU-16791 . Further, LU-17421 is created to fix the build issue for the `arc_prune_func_t` changes.
            akash-b Akash B added a comment -

            Can we check if openzfs (zfs-2.2-release and master) builds on the latest lustre-release code along with this patch, and see if there are any failures due to `arc_prune_func_t` changes

            akash-b Akash B added a comment - Can we check if openzfs (zfs-2.2-release and master) builds on the latest lustre-release code along with this patch, and see if there are any failures due to `arc_prune_func_t` changes ? 
            pjones Peter Jones added a comment -

            Landed for 2.16

            pjones Peter Jones added a comment - Landed for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52519/
            Subject: LU-16791 utils: ZFS 2.2 const prop args
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b4b32ffd22d276bc1d8f40e3336df982f3717070

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52519/ Subject: LU-16791 utils: ZFS 2.2 const prop args Project: fs/lustre-release Branch: master Current Patch Set: Commit: b4b32ffd22d276bc1d8f40e3336df982f3717070
            akash-b Akash B added a comment - - edited

            On the latest lustre-release code along with this patch, the build fails due to `arc_prune_func_t` changes: 

            /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c: In function 'osd_objset_register_callbacks':
            /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:915:50: error: passing argument 1 of 'arc_add_prune_callback' from incompatible pointer type [-Werror=incompatible-pointer-types]
              915 |         o->arc_prune_cb = arc_add_prune_callback(arc_prune_func, o);
                  |                                                  ^~~~~~~~~~~~~~
                  |                                                  |
                  |                                                  void (*)(int64_t,  void *) {aka void (*)(long long int,  void *)}
            In file included from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_internal.h:51,
                             from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:51:
            /usr/src/zfs-2.2.2/include/sys/arc.h:310:55: note: expected 'void (*)(uint64_t,  void *)' {aka 'void (*)(long long unsigned int,  void *)'} but argument is of type 'void (*)(int64_t,  void *)' {aka 'void (*)(long long int,  void *)'}
              310 | arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv);
                  |                                     ~~~~~~~~~~~~~~~~~~^~~~
            cc1: all warnings being treated as errors
            make[6]: *** [scripts/Makefile.build:321: /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.o] Error 1
            make[6]: *** Waiting for unfinished jobs....
            make[5]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre/osd-zfs] Error 2
            make[4]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre] Error 2
            make[3]: *** [Makefile:1923: /root/akash/akash/build/lustre-release] Error 2
            make[3]: Leaving directory '/usr/src/kernels/5.14.0-284.18.1.x7.0.000.9.x86_64'
            make[2]: *** [autoMakefile:1200: modules] Error 2
            make[2]: Leaving directory '/root/akash/akash/build/lustre-release'
            make[1]: *** [autoMakefile:711: all-recursive] Error 1
            make[1]: Leaving directory '/root/akash/akash/build/lustre-release'
            make: *** [autoMakefile:571: all] Error 2

            Build failure seems to be due to the changes to `arc_prune_func_t`  from the following commit from OpenZFS:

            commit 3ec4ea68d491a82c8de3360d50032bdecd53608f
            Date:   Mon Oct 30 19:56:04 2023 -0400
            Unify arc_prune_async() code
            Closes #15456
            ...
            - typedef void arc_prune_func_t(int64_t bytes, void *priv);
            + typedef void arc_prune_func_t(uint64_t bytes, void *priv);
            ...
            akash-b Akash B added a comment - - edited On the latest lustre-release code along with this patch, the build fails due to `arc_prune_func_t` changes:  /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c: In function 'osd_objset_register_callbacks' : /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:915:50: error: passing argument 1 of 'arc_add_prune_callback' from incompatible pointer type [-Werror=incompatible-pointer-types] 915 | o->arc_prune_cb = arc_add_prune_callback(arc_prune_func, o); | ^~~~~~~~~~~~~~ | | | void (*)(int64_t, void *) {aka void (*)( long long int , void *)} In file included from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_internal.h:51, from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:51: /usr/src/zfs-2.2.2/include/sys/arc.h:310:55: note: expected 'void (*)(uint64_t, void *)' {aka 'void (*)( long long unsigned int , void *)' } but argument is of type 'void (*)(int64_t, void *)' {aka 'void (*)( long long int , void *)' } 310 | arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv); | ~~~~~~~~~~~~~~~~~~^~~~ cc1: all warnings being treated as errors make[6]: *** [scripts/Makefile.build:321: /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre/osd-zfs] Error 2 make[4]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre] Error 2 make[3]: *** [Makefile:1923: /root/akash/akash/build/lustre-release] Error 2 make[3]: Leaving directory '/usr/src/kernels/5.14.0-284.18.1.x7.0.000.9.x86_64' make[2]: *** [autoMakefile:1200: modules] Error 2 make[2]: Leaving directory '/root/akash/akash/build/lustre-release' make[1]: *** [autoMakefile:711: all-recursive] Error 1 make[1]: Leaving directory '/root/akash/akash/build/lustre-release' make: *** [autoMakefile:571: all] Error 2 Build failure seems to be due to the changes to `arc_prune_func_t`  from the following commit from OpenZFS: commit 3ec4ea68d491a82c8de3360d50032bdecd53608f Date: Mon Oct 30 19:56:04 2023 -0400 Unify arc_prune_async() code Closes #15456 ... - typedef void arc_prune_func_t(int64_t bytes, void *priv); + typedef void arc_prune_func_t(uint64_t bytes, void *priv); ...

            "Brian Atkinson <batkinson@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52519
            Subject: LU-16791 utils: ZFS 2.2 const prop args
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: d01bf3997a43e13fb22067fd8ee803dc9a5a9f5c

            gerrit Gerrit Updater added a comment - "Brian Atkinson <batkinson@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52519 Subject: LU-16791 utils: ZFS 2.2 const prop args Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: d01bf3997a43e13fb22067fd8ee803dc9a5a9f5c

            "Oleg Drokin <green@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50824
            Subject: LU-16791 utils: Constify prop argument for zfs nvlist*
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: f434618dfde371b05eafeeb9ab10ab8711e0a284

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50824 Subject: LU-16791 utils: Constify prop argument for zfs nvlist* Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: f434618dfde371b05eafeeb9ab10ab8711e0a284

            People

              green Oleg Drokin
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: