* [PATCH 0/2] pNFS: disable unloading a layout driver when mounted
@ 2012-06-07 19:06 Idan Kedar
2012-06-07 19:06 ` [PATCH 1/2] pnfs-obj: disable unloading the module " Idan Kedar
2012-06-07 19:06 ` [PATCH 2/2] pnfsblock: " Idan Kedar
0 siblings, 2 replies; 4+ messages in thread
From: Idan Kedar @ 2012-06-07 19:06 UTC (permalink / raw)
To: linux-nfs
Layout drivers' refcount is incremented when a filesystem is mounted with
the layout type exported by the driver. Object layout and Block layout
drivers did not provide an owner, which means no refcount is incremented
and that the module can be unloaded while the file system is mounted
which, in turn, crashes in the layout driver when the NFS client attempts
to do something with the layout driver (typically coalescing).
Idan Kedar (2):
pnfs-obj: disable unloading the module when mounted
pnfsblock: disable unloading the module when mounted
fs/nfs/blocklayout/blocklayout.c | 1 +
fs/nfs/objlayout/objio_osd.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
--
1.7.6.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] pnfs-obj: disable unloading the module when mounted
2012-06-07 19:06 [PATCH 0/2] pNFS: disable unloading a layout driver when mounted Idan Kedar
@ 2012-06-07 19:06 ` Idan Kedar
2012-06-07 21:09 ` Boaz Harrosh
2012-06-07 19:06 ` [PATCH 2/2] pnfsblock: " Idan Kedar
1 sibling, 1 reply; 4+ messages in thread
From: Idan Kedar @ 2012-06-07 19:06 UTC (permalink / raw)
To: linux-nfs
or the kernel will oops.
Signed-off-by: Idan Kedar <idank@tonian.com>
---
fs/nfs/objlayout/objio_osd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 55d0128..b161f97 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -551,6 +551,7 @@ static const struct nfs_pageio_ops objio_pg_write_ops = {
static struct pnfs_layoutdriver_type objlayout_type = {
.id = LAYOUT_OSD2_OBJECTS,
.name = "LAYOUT_OSD2_OBJECTS",
+ .owner = THIS_MODULE,
.flags = PNFS_LAYOUTRET_ON_SETATTR |
PNFS_LAYOUTRET_ON_ERROR,
--
1.7.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] pnfsblock: disable unloading the module when mounted
2012-06-07 19:06 [PATCH 0/2] pNFS: disable unloading a layout driver when mounted Idan Kedar
2012-06-07 19:06 ` [PATCH 1/2] pnfs-obj: disable unloading the module " Idan Kedar
@ 2012-06-07 19:06 ` Idan Kedar
1 sibling, 0 replies; 4+ messages in thread
From: Idan Kedar @ 2012-06-07 19:06 UTC (permalink / raw)
To: linux-nfs
Signed-off-by: Idan Kedar <idank@tonian.com>
---
fs/nfs/blocklayout/blocklayout.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 48cfac3..c0a1464 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1005,6 +1005,7 @@ static const struct nfs_pageio_ops bl_pg_write_ops = {
static struct pnfs_layoutdriver_type blocklayout_type = {
.id = LAYOUT_BLOCK_VOLUME,
.name = "LAYOUT_BLOCK_VOLUME",
+ .owner = THIS_MODULE,
.read_pagelist = bl_read_pagelist,
.write_pagelist = bl_write_pagelist,
.alloc_layout_hdr = bl_alloc_layout_hdr,
--
1.7.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] pnfs-obj: disable unloading the module when mounted
2012-06-07 19:06 ` [PATCH 1/2] pnfs-obj: disable unloading the module " Idan Kedar
@ 2012-06-07 21:09 ` Boaz Harrosh
0 siblings, 0 replies; 4+ messages in thread
From: Boaz Harrosh @ 2012-06-07 21:09 UTC (permalink / raw)
To: Idan Kedar; +Cc: linux-nfs
On 06/07/2012 10:06 PM, Idan Kedar wrote:
> or the kernel will oops.
>
Perfect Thanks
> Signed-off-by: Idan Kedar <idank@tonian.com>
> ---
> fs/nfs/objlayout/objio_osd.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
> index 55d0128..b161f97 100644
> --- a/fs/nfs/objlayout/objio_osd.c
> +++ b/fs/nfs/objlayout/objio_osd.c
> @@ -551,6 +551,7 @@ static const struct nfs_pageio_ops objio_pg_write_ops = {
> static struct pnfs_layoutdriver_type objlayout_type = {
> .id = LAYOUT_OSD2_OBJECTS,
> .name = "LAYOUT_OSD2_OBJECTS",
> + .owner = THIS_MODULE,
> .flags = PNFS_LAYOUTRET_ON_SETATTR |
> PNFS_LAYOUTRET_ON_ERROR,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-07 21:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 19:06 [PATCH 0/2] pNFS: disable unloading a layout driver when mounted Idan Kedar
2012-06-07 19:06 ` [PATCH 1/2] pnfs-obj: disable unloading the module " Idan Kedar
2012-06-07 21:09 ` Boaz Harrosh
2012-06-07 19:06 ` [PATCH 2/2] pnfsblock: " Idan Kedar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).