Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1217512

Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs

From Matias Bjørling <m@bjorling.me>
Newsgroups linux.kernel
Subject Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs
Date 2015-09-02 12:50 +0200
Message-ID <q4dM6-2DA-17@gated-at.bofh.it> (permalink)
References <pUQYp-2fN-3@gated-at.bofh.it> <pUQYq-2fN-37@gated-at.bofh.it> <q47nk-1S4-15@gated-at.bofh.it>
Organization Paletta

Show all headers | View raw


>> +
>> +    /* register with device with a supported BM */
>> +    list_for_each_entry(bt, &nvm_bms, list) {
>> +        ret = bt->register_bm(dev);
>> +        if (ret < 0)
>> +            goto err; /* initialization failed */
>> +        if (ret > 0) {
>> +            dev->bm = bt;
>> +            break; /* successfully initialized */
>> +        }
>> +    }
>
> Why just search it from head to tail? Can user specific it
> in nvm_create_target()?

Hi Yang,

Currently only the rrpc and a couple of out of tree block managers are 
built. The register_bm only tries to find a block manager that supports 
the device, when it finds it, that  one is initialized. It is an open 
question on how we choose the right block manager, e.g. a proprietary 
and a open-source block manager is in place. Priorities might be a way 
to go? or mark certain block managers as a catch all?

Hopefully we will get away with only a single or two block managers in 
the future, so we won't have one for each type of device.

>> +
>> +    if (!ret) {
>> +        pr_info("nvm: no compatible bm was found.\n");
>> +        return 0;
>> +    }
>
> If we allow nvm_device registered with no bm, we would get
> a NULL pointer reference problem in later using.
>

Yes, definitely. In the care that happens, I envision it should be 
possible to register a block manager after a device is loaded, and then 
any outstanding devices (which does not have a registered block 
manager), will be probed again.

> As mentioned above, why we have to choose bm for nvm in nvm_register?

Without a block manager, we don't know the structure of the device and 
how to interact with it. I want to initialize that as soon as possible. 
So that layers on top can start interacting.

>
> Thanx
> Yang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-02 06:00 +0200
  Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-02 12:50 +0200
    Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-04 09:20 +0200
      Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-04 10:10 +0200
        Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-04 10:40 +0200
          Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-04 10:50 +0200

csiph-web