<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/nfs/objlayout/objlayout.h, branch v3.4.64</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>pnfs-obj: autologin: Add support for protocol autologin</title>
<updated>2012-03-21T13:31:47+00:00</updated>
<author>
<name>Sachin Bhamare</name>
<email>sbhamare@panasas.com</email>
</author>
<published>2012-03-20T03:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=18d98f6c04991dd3c12acf6f39cea40e9510640a'/>
<id>18d98f6c04991dd3c12acf6f39cea40e9510640a</id>
<content type='text'>
The pnfs-objects protocol mandates that we autologin into devices not
present in the system, according to information specified in the
get_device_info returned from the server.

The Protocol specifies two login hints.
1. An IP address:port combination
2. A string URI which is constructed as a URL with a protocol prefix
   followed by :// and a string as address. For each  protocol prefix
   the string-address format might be different.

We only support the second option. The first option is just redundant
to the second one.
NOTE: The Kernel part of autologin does not parse the URI string. It
just channels it to a user-mode script. So any new login protocols should
only update the user-mode script which is a part of the nfs-utils package,
but the Kernel need not change.

We implement the autologin by using the call_usermodehelper() API.
(Thanks to Steve Dickson &lt;steved@redhat.com&gt; for pointing it out)
So there is no running daemon needed, and/or special setup.

We Add the osd_login_prog Kernel module parameters which defaults to:
	/sbin/osd_login

Kernel try's to upcall the program specified in osd_login_prog. If the file is
not found or the execution fails Kernel will disable any farther upcalls, by
zeroing out  osd_login_prog, Until Admin re-enables it by setting the
osd_login_prog parameter to a proper program.

Also add text about the osd_login program command line API to:
	Documentation/filesystems/nfs/pnfs.txt
and documentation of the new  osd_login_prog  module parameter to:
	Documentation/kernel-parameters.txt

TODO: Add timeout option in the case osd_login program gets
              stuck

Signed-off-by: Sachin Bhamare &lt;sbhamare@panasas.com&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pnfs-objects protocol mandates that we autologin into devices not
present in the system, according to information specified in the
get_device_info returned from the server.

The Protocol specifies two login hints.
1. An IP address:port combination
2. A string URI which is constructed as a URL with a protocol prefix
   followed by :// and a string as address. For each  protocol prefix
   the string-address format might be different.

We only support the second option. The first option is just redundant
to the second one.
NOTE: The Kernel part of autologin does not parse the URI string. It
just channels it to a user-mode script. So any new login protocols should
only update the user-mode script which is a part of the nfs-utils package,
but the Kernel need not change.

We implement the autologin by using the call_usermodehelper() API.
(Thanks to Steve Dickson &lt;steved@redhat.com&gt; for pointing it out)
So there is no running daemon needed, and/or special setup.

We Add the osd_login_prog Kernel module parameters which defaults to:
	/sbin/osd_login

Kernel try's to upcall the program specified in osd_login_prog. If the file is
not found or the execution fails Kernel will disable any farther upcalls, by
zeroing out  osd_login_prog, Until Admin re-enables it by setting the
osd_login_prog parameter to a proper program.

Also add text about the osd_login program command line API to:
	Documentation/filesystems/nfs/pnfs.txt
and documentation of the new  osd_login_prog  module parameter to:
	Documentation/kernel-parameters.txt

TODO: Add timeout option in the case osd_login program gets
              stuck

Signed-off-by: Sachin Bhamare &lt;sbhamare@panasas.com&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: Rename objlayout_io_state =&gt; objlayout_io_res</title>
<updated>2011-11-03T03:56:06+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-10-31T22:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e2e04355d9647305c666462a49223f2942a635f0'/>
<id>e2e04355d9647305c666462a49223f2942a635f0</id>
<content type='text'>
* All instances of objlayout_io_state =&gt; objlayout_io_res
* All instances of state =&gt; oir;
* All instances of ol_state =&gt; oir;

Big but nothing to it

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* All instances of objlayout_io_state =&gt; objlayout_io_res
* All instances of state =&gt; oir;
* All instances of ol_state =&gt; oir;

Big but nothing to it

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: Get rid of objlayout_{alloc,free}_io_state</title>
<updated>2011-11-03T03:56:05+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-10-31T21:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=96218556b03d3c6505e2880a097338bf277fd783'/>
<id>96218556b03d3c6505e2880a097338bf277fd783</id>
<content type='text'>
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 =&gt; 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-&gt;ol_state.foo =&gt; ios-&gt;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 &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 =&gt; 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-&gt;ol_state.foo =&gt; ios-&gt;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 &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: Return PNFS_NOT_ATTEMPTED in case of read/write_pagelist</title>
<updated>2011-11-03T03:56:03+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-10-31T21:45:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6c40fe3f4c4967f1cb486191ed4a5d5f55f3f7e'/>
<id>e6c40fe3f4c4967f1cb486191ed4a5d5f55f3f7e</id>
<content type='text'>
objlayout driver was always returning PNFS_ATTEMPTED from it's
read/write_pagelist operations. Even on error. Fix that.

Start by establishing an error return API from io-engine, by
not returning ssize_t (length-or-error) but returning "int"
0=OK, 0&gt;Error. And clean up all return types in io-engine.

Then if io-engine returned error return PNFS_NOT_ATTEMPTED
to generic layer. (With a dprint)

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
objlayout driver was always returning PNFS_ATTEMPTED from it's
read/write_pagelist operations. Even on error. Fix that.

Start by establishing an error return API from io-engine, by
not returning ssize_t (length-or-error) but returning "int"
0=OK, 0&gt;Error. And clean up all return types in io-engine.

Then if io-engine returned error return PNFS_NOT_ATTEMPTED
to generic layer. (With a dprint)

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: Remove redundant EOF from objlayout_io_state</title>
<updated>2011-11-03T03:56:00+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-10-31T21:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4cdc685c7d06f659ef6c336d4242005cdd8df401'/>
<id>4cdc685c7d06f659ef6c336d4242005cdd8df401</id>
<content type='text'>
The EOF calculation was done on .read_pagelist(), cached
in objlayout_io_state-&gt;eof, and set in objlayout_read_done()
into nfs_read_data-&gt;res.eof.

So set it directly into nfs_read_data-&gt;res.eof and avoid
the extra member.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The EOF calculation was done on .read_pagelist(), cached
in objlayout_io_state-&gt;eof, and set in objlayout_read_done()
into nfs_read_data-&gt;res.eof.

So set it directly into nfs_read_data-&gt;res.eof and avoid
the extra member.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: objlayout_encode_layoutcommit implementation</title>
<updated>2011-05-29T17:55:00+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-05-22T16:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a0fe8bf427f4987d7b82678292ca03cfd7331467'/>
<id>a0fe8bf427f4987d7b82678292ca03cfd7331467</id>
<content type='text'>
* Define API for io-engines to report delta_space_used in IOs
* Encode the osd-layout specific information of the layoutcommit
  XDR buffer.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Define API for io-engines to report delta_space_used in IOs
* Encode the osd-layout specific information of the layoutcommit
  XDR buffer.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: report errors and .encode_layoutreturn Implementation.</title>
<updated>2011-05-29T17:54:45+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-05-26T18:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=adb58535e604a564495a7d50dfb0afa0ddc21bcb'/>
<id>adb58535e604a564495a7d50dfb0afa0ddc21bcb</id>
<content type='text'>
An io_state pre-allocates an error information structure for each
possible osd-device that might error during IO. When IO is done if all
was well the io_state is freed. (as today). If the I/O has ended with an
error, the io_state is queued on a per-layout err_list. When eventually
encode_layoutreturn() is called, each error is properly encoded on the
XDR buffer and only then the io_state is removed from err_list and
de-allocated.

It is up to the io_engine to fill in the segment that fault and the type
of osd_error that occurred. By calling objlayout_io_set_result() for
each failing device.

In objio_osd:
* Allocate io-error descriptors space as part of io_state
* Use generic objlayout error reporting at end of io.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An io_state pre-allocates an error information structure for each
possible osd-device that might error during IO. When IO is done if all
was well the io_state is freed. (as today). If the I/O has ended with an
error, the io_state is queued on a per-layout err_list. When eventually
encode_layoutreturn() is called, each error is properly encoded on the
XDR buffer and only then the io_state is removed from err_list and
de-allocated.

It is up to the io_engine to fill in the segment that fault and the type
of osd_error that occurred. By calling objlayout_io_set_result() for
each failing device.

In objio_osd:
* Allocate io-error descriptors space as part of io_state
* Use generic objlayout error reporting at end of io.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: osd raid engine read/write implementation</title>
<updated>2011-05-29T17:54:15+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-05-22T16:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=04f83450388e87d86b387cf4a27b81eb7e69de7d'/>
<id>04f83450388e87d86b387cf4a27b81eb7e69de7d</id>
<content type='text'>
With the use of the in-kernel osd library. Implement read/write
of data from/to osd-objects according to information specified
in the objects-layout.

Support for stripping over mirrors with a received stripe_unit.
There are however a few constrains which are not supported:
 1. Stripe Unit must be a multiple of PAGE_SIZE
 2. stripe length (stripe_unit * number_of_stripes) can not be
    bigger then 32bit.

Also support raid-groups and partial-layout. Partial-layout is
when not all the groups are received on the line, addressing
only a partial range of the file.

TODO:
  Only raid0! raid 4/5/6 support will come at later stage

A none supported layout will send IO through the MDS

[Important fallout from the last rebase]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
[gfp_flags]
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the use of the in-kernel osd library. Implement read/write
of data from/to osd-objects according to information specified
in the objects-layout.

Support for stripping over mirrors with a received stripe_unit.
There are however a few constrains which are not supported:
 1. Stripe Unit must be a multiple of PAGE_SIZE
 2. stripe length (stripe_unit * number_of_stripes) can not be
    bigger then 32bit.

Also support raid-groups and partial-layout. Partial-layout is
when not all the groups are received on the line, addressing
only a partial range of the file.

TODO:
  Only raid0! raid 4/5/6 support will come at later stage

A none supported layout will send IO through the MDS

[Important fallout from the last rebase]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
[gfp_flags]
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: define per-inode private structure</title>
<updated>2011-05-29T17:53:51+00:00</updated>
<author>
<name>Benny Halevy</name>
<email>bhalevy@panasas.com</email>
</author>
<published>2011-05-22T16:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e51b841dd0be9ff53f740c44c32c32679edcb7c8'/>
<id>e51b841dd0be9ff53f740c44c32c32679edcb7c8</id>
<content type='text'>
allocate and deallocate per-inode private pnfs_layout_hdr
in preparation for I/O implementation.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
allocate and deallocate per-inode private pnfs_layout_hdr
in preparation for I/O implementation.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pnfs-obj: objio_osd device information retrieval and caching</title>
<updated>2011-05-29T17:53:33+00:00</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2011-05-26T18:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b6c05f1693115164c7b797152ac7ea3ef8e5d296'/>
<id>b6c05f1693115164c7b797152ac7ea3ef8e5d296</id>
<content type='text'>
When a new layout is received in objio_alloc_lseg all device_ids
referenced are retrieved. The device information is queried for from MDS
and then the osd_device is looked-up from the osd-initiator library. The
devices are cached in a per-mount-point list, for later use. At unmount
all devices are "put" back to the library.

objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware
API for retrieving device information given a device_id.

TODO: The device cache can get big. Cap its size. Keep an LRU and start
      to return devices which were not used, when list gets to big, or
      when new entries allocation fail.

[pnfs-obj: Bugs in new global-device-cache code]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
[gfp_flags]
[use global device cache]
[use layout driver in global device cache]
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a new layout is received in objio_alloc_lseg all device_ids
referenced are retrieved. The device information is queried for from MDS
and then the osd_device is looked-up from the osd-initiator library. The
devices are cached in a per-mount-point list, for later use. At unmount
all devices are "put" back to the library.

objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware
API for retrieving device information given a device_id.

TODO: The device cache can get big. Cap its size. Keep an LRU and start
      to return devices which were not used, when list gets to big, or
      when new entries allocation fail.

[pnfs-obj: Bugs in new global-device-cache code]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
[gfp_flags]
[use global device cache]
[use layout driver in global device cache]
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
