[PATCH 07/10] nvme: track shared namespaces

Guan Junxiong guanjunxiong at huawei.com
Mon Aug 28 23:54:56 PDT 2017



On 2017/8/28 14:51, Sagi Grimberg wrote:
> +static int __nvme_check_ids(struct nvme_subsystem *subsys,
> +        struct nvme_ns_head *new)
> +{
> +    struct nvme_ns_head *h;
> +
> +    lockdep_assert_held(&subsys->lock);
> +
> +    list_for_each_entry(h, &subsys->nsheads, entry) {
> +        if ((!uuid_is_null(&new->uuid) &&
> +             uuid_equal(&new->uuid, &h->uuid)) ||
> +            (memchr_inv(new->nguid, 0, sizeof(new->nguid)) &&
> +             memcmp(&new->nguid, &h->nguid, sizeof(new->nguid))) ||

memcmp() -> !memcmp

> +            (memchr_inv(new->eui64, 0, sizeof(new->eui64)) &&
> +             memcmp(&new->eui64, &h->eui64, sizeof(new->eui64))))

memcmp() -> !memcmp

Otherwise in this patch, looks good.
Reviewed-by: Guan Junxiong <guanjunxiong at huawei.com>




More information about the Linux-nvme mailing list