lkml.org 
[lkml]   [2010]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] tcm: Unify INQUIRY subsystem plugin handling
From
Date
On Thu, 2010-10-14 at 02:04 +0200, Christoph Hellwig wrote:
> On Wed, Oct 13, 2010 at 01:19:49PM -0700, Nicholas A. Bellinger wrote:
> > I should point out that the majority of values mentioned here (other
> > than the two INQUIRY strings) are already present in struct
> > se_dev_attrib and which appear as configfs attributes under
> > under /sys/kernel/config/target/core/$HBA/$DEV/attrib/. This means that
> > the struct se_subsystem_api calls only really used by during init
> > target_core_device.c:se_dev_set_default_attribs() and
> > DEV_ATTRIB(dev)->block_size, etc are used in TCM Core code.
> >
> > I am happy to include the two INQUIRY strings needed for emulation into
> > struct se_subsystem_api directly, but I would still prefer to keep the
> > function pointers for extracting values from subsystem specific code for
> > the initial device attribute setup.
>
> What's the point? It's a lot of boilerplate code that does nothing
> but obsfucating what's actually going on there.
>

So you would rather have struct se_device attributes set in TCM
subsystem specific ->create_virtdevice() code directly after
transport_add_device_to_core_hba() -> se_dev_set_default_attribs(),
right..?

Performing the assignment of these attribute values from the same local
functions and dropping the extra struct se_subsystem_api callers would
be fine with me, but I honestly don't see how these handful of subsystem
API callers with obvious names adds obsfucation while TCM code is using
struct se_device->$ATTR_NAME to enforce device limits in I/O path
code...?

Thanks for your comments.. ;)

--nab



\
 
 \ /
  Last update: 2010-10-14 06:43    [W:0.268 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site