Skip to contentSkip to conversation

xfsdump fails to build against xfsprogs 5.18.0

bug report [email protected] 2 participants 3 messages Jun 28, 2022 – Jun 29, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

I package xfsdump for NixOS, and I have found that a recent upgrade from xfsprogs 5.16.0 to 5.18.0 has caused a build failure for xfsprogs. See [1] for an excerpt from the build logs. My novice investigation of the issue and disccusion IRC indicates that the removal of DMAPI support is behind this.

Best,
Corin Hoad

[1]
content.c: In function 'restore_complete_reg':
content.c:7727:29: error: storage size of 'fssetdm' isn't known
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:7734:34: error: 'XFS_IOC_FSSETDM' undeclared (first use in this function); did you mean 'XFS_IOC_FSSETXATTR'?
7734 | rval = ioctl(fd, XFS_IOC_FSSETDM, (void

*)&fssetdm);
      |                                  ^~~~~~~~~~~~~~~
      |                                  XFS_IOC_FSSETXATTR

content.c:7734:34: note: each undeclared identifier is reported only once for each function it appears in content.c:7727:29: warning: unused variable 'fssetdm' [-Wunused-variable]
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c: In function 'restore_symlink':
content.c:8061:29: error: storage size of 'fssetdm' isn't known
8061 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:8061:29: warning: unused variable 'fssetdm' [-Wunused-variable]
content.c: In function 'setextattr':
content.c:8867:9: warning: 'attr_set' is deprecated: Use setxattr or lsetxattr instead [-Wdeprecated-declarations]

 8867 |         rval = attr_set(path,
      |         ^~~~
In file included from content.c:27:
/nix/store/7b84p7877fl9p8aqx392drggj0jkqd0j-attr-2.5.1-dev/include/attr/attributes.h:139:12: note: declared here
  139 | extern int attr_set (const char *__path, const char *__attrname,
      |            ^~~~~~~~
content.c: In function 'Media_mfile_next':
content.c:4797:33: warning: ignoring return value of 'system' declared with attribute 'warn_unused_result' [-Wunused-result]
 4797 |                                 system(media_change_alert_program);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
content.c: In function 'restore_extent':
content.c:8625:49: warning: ignoring return value of 'ftruncate' declared with attribute 'warn_unused_result' [-Wunused-result]
 8625 |                                                 ftruncate(fd, 
bstatp->bs_size);
      | 

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [../include/buildrules:47: content.o] Error 1 make[1]: *** [include/buildrules:23: restore] Error 2
make: *** [Makefile:53: default] Error 2

#1 lore raw
Quoted 6 lines · On Tue, Jun 28, 2022 at 11:32:48PM +0100, [email protected] wrote:

Hello,

I package xfsdump for NixOS, and I have found that a recent upgrade from xfsprogs 5.16.0 to 5.18.0 has caused a build failure for xfsprogs. See [1] for an excerpt from the build logs. My novice investigation of the issue and disccusion IRC indicates that the removal of DMAPI support is behind this.

Oops, we dropped the ball on this. Does this patch[1] fix the problem?

--D

[1] https://lore.kernel.org/linux-xfs/20220203174540.GT8313@magnolia/

Quoted 48 lines

Best,
Corin Hoad

[1]
content.c: In function 'restore_complete_reg':
content.c:7727:29: error: storage size of 'fssetdm' isn't known
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:7734:34: error: 'XFS_IOC_FSSETDM' undeclared (first use in this function); did you mean 'XFS_IOC_FSSETXATTR'?

 7734 |                 rval = ioctl(fd, XFS_IOC_FSSETDM, (void *)&fssetdm);
      |                                  ^~~~~~~~~~~~~~~
      |                                  XFS_IOC_FSSETXATTR

content.c:7734:34: note: each undeclared identifier is reported only once for each function it appears in
content.c:7727:29: warning: unused variable 'fssetdm' [-Wunused-variable]
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c: In function 'restore_symlink':
content.c:8061:29: error: storage size of 'fssetdm' isn't known
8061 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:8061:29: warning: unused variable 'fssetdm' [-Wunused-variable] content.c: In function 'setextattr':
content.c:8867:9: warning: 'attr_set' is deprecated: Use setxattr or lsetxattr instead [-Wdeprecated-declarations]

 8867 |         rval = attr_set(path,
      |         ^~~~

In file included from content.c:27:
/nix/store/7b84p7877fl9p8aqx392drggj0jkqd0j-attr-2.5.1-dev/include/attr/attributes.h:139:12:
note: declared here
139 | extern int attr_set (const char *__path, const char *__attrname,

      |            ^~~~~~~~
content.c: In function 'Media_mfile_next':
content.c:4797:33: warning: ignoring return value of 'system' declared with
attribute 'warn_unused_result' [-Wunused-result]
 4797 |                                 system(media_change_alert_program);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

content.c: In function 'restore_extent':
content.c:8625:49: warning: ignoring return value of 'ftruncate' declared with attribute 'warn_unused_result' [-Wunused-result]
8625 | ftruncate(fd,

bstatp->bs_size);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

make[2]: *** [../include/buildrules:47: content.o] Error 1 make[1]: *** [include/buildrules:23: restore] Error 2
make: *** [Makefile:53: default] Error 2

author
#2 lore raw

Yes, xfsdump builds with that patch applied, and I don't see any immediate issue with basic functionality.

Thanks,
Corin Hoad

Quoted 62 lines · Darrick J. Wong
Quoted 6 lines · On Tue, Jun 28, 2022 at 11:32:48PM +0100, [email protected] wrote:

Hello,

I package xfsdump for NixOS, and I have found that a recent upgrade from xfsprogs 5.16.0 to 5.18.0 has caused a build failure for xfsprogs. See [1] for an excerpt from the build logs. My novice investigation of the issue and disccusion IRC indicates that the removal of DMAPI support is behind this.

Oops, we dropped the ball on this. Does this patch[1] fix the problem?

--D

[1] https://lore.kernel.org/linux-xfs/20220203174540.GT8313@magnolia/

Quoted 48 lines

Best,
Corin Hoad

[1]
content.c: In function 'restore_complete_reg':
content.c:7727:29: error: storage size of 'fssetdm' isn't known
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:7734:34: error: 'XFS_IOC_FSSETDM' undeclared (first use in this function); did you mean 'XFS_IOC_FSSETXATTR'?

  7734 |                 rval = ioctl(fd, XFS_IOC_FSSETDM, (void *)&fssetdm);
       |                                  ^~~~~~~~~~~~~~~
       |                                  XFS_IOC_FSSETXATTR

content.c:7734:34: note: each undeclared identifier is reported only once for each function it appears in
content.c:7727:29: warning: unused variable 'fssetdm' [-Wunused-variable]
7727 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c: In function 'restore_symlink':
content.c:8061:29: error: storage size of 'fssetdm' isn't known
8061 | fsdmidata_t fssetdm;
| ^~~~~~~
content.c:8061:29: warning: unused variable 'fssetdm' [-Wunused-variable] content.c: In function 'setextattr':
content.c:8867:9: warning: 'attr_set' is deprecated: Use setxattr or lsetxattr instead [-Wdeprecated-declarations]

  8867 |         rval = attr_set(path,
       |         ^~~~

In file included from content.c:27:
/nix/store/7b84p7877fl9p8aqx392drggj0jkqd0j-attr-2.5.1-dev/include/attr/attributes.h:139:12:
note: declared here
139 | extern int attr_set (const char *__path, const char *__attrname,

       |            ^~~~~~~~
content.c: In function 'Media_mfile_next':
content.c:4797:33: warning: ignoring return value of 'system' declared with
attribute 'warn_unused_result' [-Wunused-result]
  4797 |                                 system(media_change_alert_program);
       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

content.c: In function 'restore_extent':
content.c:8625:49: warning: ignoring return value of 'ftruncate' declared with attribute 'warn_unused_result' [-Wunused-result]
8625 | ftruncate(fd,

bstatp->bs_size);
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

make[2]: *** [../include/buildrules:47: content.o] Error 1 make[1]: *** [include/buildrules:23: restore] Error 2
make: *** [Makefile:53: default] Error 2