Re: [PATCH v2 10/10] dm-zoned: Drive-managed zoned block device target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-05-02 at 02:53 +0900, damien.lemoal@xxxxxxx wrote:
> +static unsigned long dmz_mblock_shrinker_count(struct shrinker *shrink,
> +                                              struct shrink_control *sc)
> +{
> +       struct dmz_target *dmz =
> +               container_of(shrink, struct dmz_target, mblk_shrinker);
> +
> +       return atomic_read(&dmz->nr_mblks);
> +}

Hello Damien,

dmz_mblock_shrinker_count() probably should return the following value since
dmz_shrink_mblock_cache() won't free more than the this number of elements:

        max(atomic_read(&dmz->nr_mblks) - dmz->min_nr_mblks, 0) 

But since v2 is IMHO good enough to be merged, for the whole series:

Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux