[stgt] Write-cache in tgtd during a target-host crash
Mike Anderson
andmike at linux.vnet.ibm.com
Wed Apr 21 23:44:13 CEST 2010
Chandra Seetharaman <sekharan at us.ibm.com> wrote:
>
> On Wed, 2010-04-21 at 19:51 +1000, ronnie sahlberg wrote:
> >
> >
> > Tomo, would a patch that allows setting the O_DIRECT/O_SYNC flags on
> > the command line when invoking tgtd be acceptable?
> >
> >
> >
> >
> > tgtd -o O_SYNC tgtd -o O_DIRECT tgtd -o O_SYNC|O_DIRECT
> >
> >
> >
> > The appropriate flags in the caching mode page could be intercepted
> > and use to toggle these fd settings.
> >
> > My filesystem of choice would likely benefit greatly from O_DIRECT.
>
> I see the feature being useful.
>
> But, I would associate this to be a characteristic of the backing store
> than set it globally at tgtd (or we can have a it at global(read tgtd
> level) and ability to revert it at the backing store).
> >
If we associate the open flags to the backing store would we want to allow
full control of the open flags or just setting a subset of flags.
I hacked up tgtadm and a few of the target.c functions for the examples below.
./tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /disk1
--bsoflags "O_RDWR| O_LARGEFILE | O_DIRECT" --device-type disk
or
tgtadm --op update --mode logicalunit --tid 1 --lun 1 --params bsoflags="O_RDWR| O_LARGEFILE | O_DIRECT"
./tgtadm --op show --mode target
...
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 105 MB
Online: Yes
Removable media: No
Backing store type: rdwr
Backing store flags: O_RDWR | O_LARGEFILE | O_DIRECT
Backing store path: /disk1
...
-andmike
--
Michael Anderson
andmike at linux.vnet.ibm.com
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list