[Stgt-devel] [PATCH] Proof of Concept -> Separate thread init/tear-down from backing store open/close.

Mark Harvey markh794
Thu Jul 31 00:17:47 CEST 2008


On Thu, Jul 31, 2008 at 4:19 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Wed, Jul 30, 2008 at 5:50 AM, FUJITA Tomonori
> <fujita.tomonori at lab.ntt.co.jp> wrote:
>> On Wed, 30 Jul 2008 17:44:25 +1000
>> Mark Harvey <markh794 at gmail.com> wrote:
>>
>>> Patch also included as an attachment - just in case.
>>>
>>> >From 715e434fff633ff8f346d181aeae3f27c9564553 Mon Sep 17 00:00:00 2001
>>> From: Mark Harvey <markh794 at gmail.com>
>>> Date: Wed, 30 Jul 2008 17:27:28 +1000
>>> Subject: Separate thread init/tear-down from backing store open/close.
>>>
>>> Fix segfault when lu created without a backing store.
>>>  - Devices defined as 'removable' are able to be configured without a backing
>>>    store defined.
>>>  - thread init via bs_init() which is called for all logical units
>>>  - thread tear-down via bs_exit() which is called for all logical units.
>>>  - bs_open() limited to opening backing store path (called when required).
>>>  - bs_close() limited to closing backing store fd (called when required).
>>>
>>> Note: bs_aio and bs_mmap compile-tested only.
>>>
>>> Signed-off-by: Mark Harvey <markh794 at gmail.com>
>>> ---
>>>  usr/bs_aio.c  |   25 +++++++++++++++++--------
>>>  usr/bs_mmap.c |   22 ++++++++++++----------
>>>  usr/bs_rdwr.c |   25 ++++++++++++++-----------
>>>  usr/bs_ssc.c  |   25 +++++++++++++------------
>>>  usr/target.c  |   15 ++++++++++++---
>>>  usr/tgtd.h    |    2 ++
>>>  6 files changed, 70 insertions(+), 44 deletions(-)
>>
>> Thanks, looks nice.
>>
>> We need to check the return value of bs_init but the rest is fine by
>> me (I've attached a patch).

Many thanks - please apply.

Or would you like me to re-do the patch with your improvements included ?

>>
>> Have you tested this?

Just minimum testing..

Compile tested the bs_aio & bs_mmap only.

>>
>> If it works fine for ssc and mmc, I'll apply the patches.
>
> I have tested with both SSC and MMC now, and both work fine.

Many thanks Richard.

>
> I will apply your additional patch to my tree as well, but I imagine
> that will work fine as well.
>
> Now I can work on properly handling file marks and so forth ...
> _______________________________________________
> Stgt-devel mailing list
> Stgt-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/stgt-devel
>



More information about the stgt mailing list