-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
argSUSed: lib (so also the bit of module that is built for lib), include #12844
Conversation
f9cb23e
to
16aeed5
Compare
16aeed5
to
61d5b2b
Compare
Rebased with full commit messages, should be g2g, but see notes in OP |
bbe819a
to
4f517c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. In order to move this forward what I'd like to do is move the commits which include functional changes, or I commented on specifically, in to their own PRs. We'll want to round up additional reviewers for those.
For the rest it would be nice to squash the patch stack a bit. One option would be merging similar commits together by library/module or header.
module/os/freebsd/zfs/vdev_file.c
Outdated
abd_return_buf_copy(zio->io_abd, buf, size); | ||
} else { | ||
buf = abd_borrow_buf_copy(zio->io_abd, zio->io_size); | ||
err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid); | ||
(void) zfs_file_pwrite(vf->vf_file, buf, size, off, &resid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bug. err
should be assigned to zio->io_error
after the conditional, see the Linux version of vdev_file_io_strategy
. Can you move the updated fix for this to its own PR for review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module/os/freebsd/zfs/zfs_vfsops.c
Outdated
|
||
for (i = 0; i < sizeof (zlfid->zf_setid); i++) | ||
objsetid |= ((uint64_t)zlfid->zf_setid[i]) << (8 * i); | ||
|
||
for (i = 0; i < sizeof (zlfid->zf_setgen); i++) | ||
setgen |= ((uint64_t)zlfid->zf_setgen[i]) << (8 * i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also a good chance this is bug, the Linux counterpart to this function zfs_vget
does make use of setgen
for an error case. This would also be a good candidate to move to it's own PR so we can get the FreeBSD folks to take a closer look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1947,7 +1948,7 @@ arc_fill_hdr_crypt(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, spa_t *spa, | |||
* arc_buf_fill(). | |||
*/ | |||
static void | |||
arc_buf_untransform_in_place(arc_buf_t *buf, kmutex_t *hash_lock) | |||
arc_buf_untransform_in_place(arc_buf_t *buf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for context the hash_lock
still actually may be checked here through the HDR_EMPTY_OR_LOCKED()
check. It doesn't need so this looks fine.
@@ -249,6 +249,6 @@ zfs_dev_flush(int fd __unused) | |||
} | |||
|
|||
void | |||
update_vdevs_config_dev_sysfs_path(nvlist_t *config) | |||
update_vdevs_config_dev_sysfs_path(nvlist_t *config __unused) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why __unused
here and not (void) config
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there's __unused above, too, but fair point, I've changed them both to void casts.
Based on http://build.zfsonlinux.org/builders/FreeBSD%20stable%2F13%20amd64%20%28TEST%29/builds/2977/steps/shell_1/logs/make Fix from openzfs#12844 (comment) Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Based on http://build.zfsonlinux.org/builders/FreeBSD%20stable%2F13%20amd64%20%28TEST%29/builds/2977/steps/shell_1/logs/make Fix from openzfs#12844 (comment) Signed-off-by: Ahelenia Ziemiańska <[email protected]>
1e94e67
to
f5bce0d
Compare
Updated. Moved the remaining one (libzfs/sendrecv) to #12906, others as noted. As it stands, here's all the sus commits (sorted by amount of commits per section for demonstration purposes):
Here's variant lite (libraries grouped, modules grouped by the subsystem):
Or variant heavy (grouped by module, I kept the linux/freebsd bits separate because I usually do but in variant heavy+, let's say, these can also meld together):
Which one strikes you best? |
Let's go with the last variant, that seems like a sufficient level of granularity for this kind of change. The
|
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Fix from openzfs#12844 (comment) Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12905
All it is right now is some #if 0ed Solaris code that returns ENOSYS, and is only applicable for the Solaris blockdev layer. In the Illumos gate, there's a single user: rmformat(1); I recommend a read of the manual as a blast from the past, but, well Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Issue openzfs#12844 Closes openzfs#12969
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12844
Fix from openzfs#12844 (comment) Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12905
All it is right now is some #if 0ed Solaris code that returns ENOSYS, and is only applicable for the Solaris blockdev layer. In the Illumos gate, there's a single user: rmformat(1); I recommend a read of the manual as a blast from the past, but, well Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Issue openzfs#12844 Closes openzfs#12969
Motivation and Context
There are 2 unused arguments among us.
Description
Draft because on top of #12835 and #12067, otherwise should beg2g except as indicated below.The main revelation over my previous attempt at this was making ASSERTs et al do (void)sizeof(args)...: this doesn't ODR-use the arguments, so they get elided as usual, but it marks them as used (and actually verifies that they compile, which is a nice bonus), bringing the total diffstat to just
across 97 commits, which is more than fine, imo
These are sequestered to the first two commits.
Commits that start with a
!
are more than purely editorial. In zfs sendrecv, I think this was a bug that I fixed. In arc.c I removed the mutex argument, which the comment says is used but isn't, and is only used by the caller?In rdwr_efi.c, do we want efi_type() anymore? All it is right now is some #if 0ed Solaris code that returns ENOSYS, and is only applicable for the Solaris blockdev layer. In the Illumos gate, there's a single user: rmformat(1); I recommend a read of the manual as a blast from the past, but, well.
How Has This Been Tested?
make -C lib/
builds clean on clang 14 when configured with-Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers
in CFLAGSgit -C lib grep -i argsused
and the equivalent invocations forinclude
andmodule/{avl,icp,lua,nvpair,spl,unicode,zcommon,zstd}
are empty. The keen-eyed observer will note that this leaves onlymodule/zfs
andmodule/os
(f/s, f/z, and l/z). (Well, andcstyle.pl
.)Types of changes
Checklist:
Signed-off-by
. – needs mass replacing on;
when ready