]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pnfs-obj: Get rid of objlayout_{alloc,free}_io_state
authorBoaz Harrosh <bharrosh@panasas.com>
Mon, 31 Oct 2011 21:47:32 +0000 (14:47 -0700)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 3 Nov 2011 03:56:05 +0000 (23:56 -0400)
commit96218556b03d3c6505e2880a097338bf277fd783
tree0e6d80437979a158af20b73b8d2cd985478e553d
parente6c40fe3f4c4967f1cb486191ed4a5d5f55f3f7e
pnfs-obj: Get rid of objlayout_{alloc,free}_io_state

This is part of moving objio_osd to use the ORE.

objlayout_io_state had two functions:
1. It was used in the error reporting mechanism at layout_return.
   This function is kept intact.
   (Later patch will rename objlayout_io_state => objlayout_io_res)
2. Carrier of rw io members into the objio_read/write_paglist API.
   This is removed in this patch.

The {r,w}data received from NFS are passed directly to the
objio_{read,write}_paglist API. The io_engine is now allocating
it's own IO state as part of the read/write. The minimal
functionality that was part of the generic allocation is passed
to the io_engine.

So part of this patch is rename of:
ios->ol_state.foo => ios->foo

At objlayout_{read,write}_done an objlayout_io_state is passed that
denotes the result of the IO. (Hence the later name change).
If the IO is successful objlayout calls an objio_free_result() API
immediately (Which for objio_osd causes the release of the io_state).
If the IO ended in an error it is hanged onto until reported in
layout_return and is released later through the objio_free_result()
API. (All this is not new just renamed and cleaned)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objlayout.c
fs/nfs/objlayout/objlayout.h