Skip to content

Commit

Permalink
Linux 5.10 compat: also zvol_revalidate_disk()
Browse files Browse the repository at this point in the history
Commit 59b6872 added a configure check for 5.10, which removed
revalidate_disk(), and conditionally replaced it's usage with a call to
the new revalidate_disk_size() function.  However, the old function also
invoked the device's registered callback, in our case
zvol_revalidate_disk().  This commit adds a call to zvol_revalidate_disk()
in zvol_update_volsize() to make sure the code path stays the same.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Michael D Labriola <michael.d.labriola@gmail.com>
Closes #11358
  • Loading branch information
veggiemike authored Dec 18, 2020
1 parent 77f09e2 commit 1c0bbd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/os/linux/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,11 +644,12 @@ zvol_revalidate_disk(struct gendisk *disk)
static int
zvol_update_volsize(zvol_state_t *zv, uint64_t volsize)
{
struct gendisk *disk = zv->zv_zso->zvo_disk;

#ifdef HAVE_REVALIDATE_DISK_SIZE
revalidate_disk_size(zv->zv_zso->zvo_disk, false);
revalidate_disk_size(disk, zvol_revalidate_disk(disk) == 0);
#else
revalidate_disk(zv->zv_zso->zvo_disk);
revalidate_disk(disk);
#endif
return (0);
}
Expand Down

0 comments on commit 1c0bbd5

Please sign in to comment.