<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/nfs/objlayout, branch v3.4.44</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/nfs/objlayout?h=v3.4.44</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/nfs/objlayout?h=v3.4.44'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-28T14:59:02Z</updated>
<entry>
<title>umount oops when remove blocklayoutdriver first</title>
<updated>2013-02-28T14:59:02Z</updated>
<author>
<name>fanchaoting</name>
<email>fanchaoting@cn.fujitsu.com</email>
</author>
<published>2013-02-04T13:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e0ed8259d2016543b07a43896bc6f4b7f541e42'/>
<id>urn:sha1:8e0ed8259d2016543b07a43896bc6f4b7f541e42</id>
<content type='text'>
commit 5a12cca697aca5dfba42a7d4c3356acc0445a2b0 upstream.

now pnfs client uses block layout, maybe we can remove
blocklayoutdriver first. if we umount later,
it can cause oops in unset_pnfs_layoutdriver.
because nfss-&gt;pnfs_curr_ld-&gt;clear_layoutdriver is invalid.

reproduce it:
 modprobe  blocklayoutdriver
 mount -t nfs4 -o minorversion=1 pnfsip:/ /mnt/
 rmmod blocklayoutdriver
 umount /mnt

then you can see following

CPU 0
Pid: 17023, comm: umount.nfs4 Tainted: GF          O 3.7.0-rc6-pnfs #1 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
RIP: 0010:[&lt;ffffffffa04cfe6d&gt;]  [&lt;ffffffffa04cfe6d&gt;] unset_pnfs_layoutdriver+0x1d/0x70 [nfsv4]
RSP: 0018:ffff8800022d9e48  EFLAGS: 00010286
RAX: ffffffffa04a1b00 RBX: ffff88000b013800 RCX: 0000000000000001
RDX: ffffffff81ae8ee0 RSI: ffff880001ee94b8 RDI: ffff88000b013800
RBP: ffff8800022d9e58 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff880001ee9400
R13: ffff8800105978c0 R14: 00007fff25846c08 R15: 0000000001bba550
FS:  00007f45ae7f0700(0000) GS:ffff880012c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa04a1b38 CR3: 0000000002c0c000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process umount.nfs4 (pid: 17023, threadinfo ffff8800022d8000, task ffff880006e48aa0)
Stack:
ffff8800105978c0 ffff88000b013800 ffff8800022d9e78 ffffffffa04cd0ce
ffff8800022d9e78 ffff88000b013800 ffff8800022d9ea8 ffffffffa04755a7
ffff8800022d9ea8 ffff880002f96400 ffff88000b013800 ffff880002f96400
Call Trace:
[&lt;ffffffffa04cd0ce&gt;] nfs4_destroy_server+0x1e/0x30 [nfsv4]
[&lt;ffffffffa04755a7&gt;] nfs_free_server+0xb7/0x150 [nfs]
[&lt;ffffffffa047d4d5&gt;] nfs_kill_super+0x35/0x40 [nfs]
[&lt;ffffffff81178d35&gt;] deactivate_locked_super+0x45/0x70
[&lt;ffffffff8117986a&gt;] deactivate_super+0x4a/0x70
[&lt;ffffffff81193ee2&gt;] mntput_no_expire+0xd2/0x130
[&lt;ffffffff81194d62&gt;] sys_umount+0x72/0xe0
[&lt;ffffffff8154af59&gt;] system_call_fastpath+0x16/0x1b
Code: 06 e1 b8 ea ff ff ff eb 9e 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 80 03 00 00 48 89 fb 48 85 c0 74 29 &lt;48&gt; 8b 40 38 48 85 c0 74 02 ff d0 48 8b 03 3e ff 48 04 0f 94 c2
RIP  [&lt;ffffffffa04cfe6d&gt;] unset_pnfs_layoutdriver+0x1d/0x70 [nfsv4]
RSP &lt;ffff8800022d9e48&gt;
CR2: ffffffffa04a1b38
---[ end trace 29f75aaedda058bf ]---

Signed-off-by: fanchaoting&lt;fanchaoting@cn.fujitsu.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pnfs-obj: Fix __r4w_get_page when offset is beyond i_size</title>
<updated>2012-08-09T15:31:40Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2012-06-07T23:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a647f0df62cc4eaa0f42b85c71843ed90e150536'/>
<id>urn:sha1:a647f0df62cc4eaa0f42b85c71843ed90e150536</id>
<content type='text'>
commit c999ff68029ebd0f56ccae75444f640f6d5a27d2 upstream.

It is very common for the end of the file to be unaligned on
stripe size. But since we know it's beyond file's end then
the XOR should be preformed with all zeros.

Old code used to just read zeros out of the OSD devices, which is a great
waist. But what scares me more about this situation is that, we now have
pages attached to the file's mapping that are beyond i_size. I don't
like the kind of bugs this calls for.

Fix both birds, by returning a global zero_page, if offset is beyond
i_size.

TODO:
	Change the API to -&gt;__r4w_get_page() so a NULL can be
	returned without being considered as error, since XOR API
	treats NULL entries as zero_pages.

[Bug since 3.2. Should apply the same way to all Kernels since]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
[bwh: Backported to 3.2: adjust for lack of wdata-&gt;header]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pnfs-obj: don't leak objio_state if ore_write/read fails</title>
<updated>2012-07-29T15:04:20Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2012-06-08T02:29:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=08603bdd6b0b65248921c8be05febe574dd78905'/>
<id>urn:sha1:08603bdd6b0b65248921c8be05febe574dd78905</id>
<content type='text'>
commit 9909d45a8557455ca5f8ee7af0f253debc851f1a upstream.

[Bug since 3.2 Kernel]
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pnfs-obj: Remove unused variable from objlayout_get_deviceinfo()</title>
<updated>2012-04-26T16:15:51Z</updated>
<author>
<name>Sachin Bhamare</name>
<email>sbhamare@panasas.com</email>
</author>
<published>2012-03-30T21:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9526b2b6d6b9f183b66cf21c4afa6e79d5a14f44'/>
<id>urn:sha1:9526b2b6d6b9f183b66cf21c4afa6e79d5a14f44</id>
<content type='text'>
Local variable 'sb' was not being used in objlayout_get_deviceinfo().

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>
</entry>
<entry>
<title>pnfs-obj: autologin: Add support for protocol autologin</title>
<updated>2012-03-21T13:31:47Z</updated>
<author>
<name>Sachin Bhamare</name>
<email>sbhamare@panasas.com</email>
</author>
<published>2012-03-20T03:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18d98f6c04991dd3c12acf6f39cea40e9510640a'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>pnfs-obj: Uglify objio_segment allocation for the sake of the principle :-(</title>
<updated>2012-03-14T03:47:59Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2012-03-14T03:44:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5318a29c1943e9719e71495db6efb6fc084a45a9'/>
<id>urn:sha1:5318a29c1943e9719e71495db6efb6fc084a45a9</id>
<content type='text'>
At some past instance Linus Trovalds wrote:
&gt; From: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
&gt; commit a84a79e4d369a73c0130b5858199e949432da4c6 upstream.
&gt;
&gt; The size is always valid, but variable-length arrays generate worse code
&gt; for no good reason (unless the function happens to be inlined and the
&gt; compiler sees the length for the simple constant it is).
&gt;
&gt; Also, there seems to be some code generation problem on POWER, where
&gt; Henrik Bakken reports that register r28 can get corrupted under some
&gt; subtle circumstances (interrupt happening at the wrong time?).  That all
&gt; indicates some seriously broken compiler issues, but since variable
&gt; length arrays are bad regardless, there's little point in trying to
&gt; chase it down.
&gt;
&gt; "Just don't do that, then".

Since then any use of "variable length arrays" has become blasphemous.
Even in perfectly good, beautiful, perfectly safe code like the one
below where the variable length arrays are only used as a sizeof()
parameter, for type-safe dynamic structure allocations. GCC is not
executing any stack allocation code.

I have produced a small file which defines two functions main1(unsigned numdevs)
and main2(unsigned numdevs). main1 uses code as before with call to malloc
and main2 uses code as of after this patch. I compiled it as:
	gcc -O2 -S see_asm.c
and here is what I get:

&lt;see_asm.s&gt;
main1:
.LFB7:
	.cfi_startproc
	mov	%edi, %edi
	leaq	4(%rdi,%rdi), %rdi
	salq	$3, %rdi
	jmp	malloc
	.cfi_endproc
.LFE7:
	.size	main1, .-main1
	.p2align 4,,15
	.globl	main2
	.type	main2, @function
main2:
.LFB8:
	.cfi_startproc
	mov	%edi, %edi
	addq	$2, %rdi
	salq	$4, %rdi
	jmp	malloc
	.cfi_endproc
.LFE8:
	.size	main2, .-main2
	.section	.text.startup,"ax",@progbits
	.p2align 4,,15
&lt;/see_asm.s&gt;

*Exact* same code !!!

So please seriously consider not accepting this patch and leave the
perfectly good code intact.

CC: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix a number of sparse warnings</title>
<updated>2012-03-11T19:14:16Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-03-11T17:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=17280175c587469b34757263c7cfc608f0ea2334'/>
<id>urn:sha1:17280175c587469b34757263c7cfc608f0ea2334</id>
<content type='text'>
Fix a number of "warning: symbol 'foo' was not declared. Should it be
static?" conditions.

Fix 2 cases of "warning: Using plain integer as NULL pointer"

fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer
  - We want to allow upgrades to a WRITE delegation, but should otherwise
    consider servers that hand out duplicate delegations to be borken.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: start printks w/ NFS: even if __func__ shown</title>
<updated>2012-02-06T23:48:00Z</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@netapp.com</email>
</author>
<published>2012-01-26T18:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a030889a01d1bea921e1a7501010b7b891d2abd2'/>
<id>urn:sha1:a030889a01d1bea921e1a7501010b7b891d2abd2</id>
<content type='text'>
This patch addresses printks that have some context to show that they are
from fs/nfs/, but for the sake of consistency now start with NFS:

Signed-off-by: Weston Andros Adamson &lt;dros@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>pnfs-obj: Must return layout on IO error</title>
<updated>2012-01-06T13:55:33Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2012-01-06T07:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fe0fe83585f88346557868a803a479dfaaa0688a'/>
<id>urn:sha1:fe0fe83585f88346557868a803a479dfaaa0688a</id>
<content type='text'>
As mandated by the standard. In case of an IO error, a pNFS
objects layout driver must return it's layout. This is because
all device errors are reported to the server as part of the
layout return buffer.

This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR
is done, through a bit flag on the pnfs_layoutdriver_type-&gt;flags
member. The flag is set by the layout driver that wants a
layout_return preformed at pnfs_ld_{write,read}_done in case
of an error.
(Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr
 because this code is never called outside of pnfs.c and pnfs IO
 paths)

Without this patch 3.[0-2] Kernels leak memory and have an annoying
WARN_ON after every IO error utilizing the pnfs-obj driver.

[This patch is for 3.2 Kernel. 3.1/0 Kernels need a different patch]
CC: Stable Tree &lt;stable@kernel.org&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>pnfs-obj: pNFS errors are communicated on iodata-&gt;pnfs_error</title>
<updated>2012-01-06T13:55:23Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2012-01-06T07:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c0b4129c07b902b27d3f3ebc087757f534a3abd'/>
<id>urn:sha1:5c0b4129c07b902b27d3f3ebc087757f534a3abd</id>
<content type='text'>
Some time along the way pNFS IO errors were switched to
communicate with a special iodata-&gt;pnfs_error member instead
of the regular RPC members. But objlayout was not switched
over.

Fix that!
Without this fix any IO error is hanged, because IO is not
switched to MDS and pages are never cleared or read.

[Applies to 3.2.0. Same bug different patch for 3.1/0 Kernels]
CC: Stable Tree &lt;stable@kernel.org&gt;
Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
</feed>
