]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pnfs-obj: Get rid of objlayout_{alloc,free}_io_state
authorBoaz Harrosh <bharrosh@panasas.com>
Wed, 17 Aug 2011 00:34:59 +0000 (17:34 -0700)
committerBoaz Harrosh <bharrosh@panasas.com>
Tue, 4 Oct 2011 10:17:17 +0000 (12:17 +0200)
commit8b40d31af735816bcb2409f1b1497a27068b83ff
treeb4b973ea689f048505ff229618c51c1efb80ecfc
parente4ec2aff2cf48a874fc834fcf22faaf732d82e6f
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>
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objlayout.c
fs/nfs/objlayout/objlayout.h