Declare modalias for nfs4filelayout to support auto-loading of modules.
Subsystems (2)
PATCH 1/1 Declare modalias for nfs4filelayout to support auto-loading of modules.
Hi,
I had a brief look at configuring pnfs recently and wondered why
http://wiki.linux-nfs.org/wiki/index.php/PNFS_Setup_Instructions
suggested that the layout module should be explicitly 'modprobe'd when that sort of thing is normally automatic.pnfs.c makes the appropriate 'request-module' call, but there is no MODULE_ALIAS to link the relevant module with the requested name.
This patch adds the required MODULE_ALIAS. It has only been compile-tested (my interest is as yet only theoretical :-)
Thanks,
NeilBrown
Quoted 1 line
From
1f87c7a913fd7d4caf8b464761e44d109512aad6Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Mon, 16 May 2011 10:55:57 +1000
Subject: [PATCH] Declare modalias for nfs4filelayout to support auto-loading of modules.
pnfs.c uses 'request_module' with the name
nfs-layouttype4-1
when it actually wants
nfs4filelayout
so give the latter a "MODULE_ALIAS" so it can be found with the former name.
This avoids needing to add an alais to /etc/modprobe.d/...
--- fs/nfs/nfs4filelayout.c | 1 + fs/nfs/pnfs.h | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
fs/nfs/nfs4filelayout.c +1 -0
@@ -873,6 +873,7 @@ static struct pnfs_layoutdriver_type filelayout_type = { .read_pagelist = filelayout_read_pagelist, .write_pagelist = filelayout_write_pagelist, }; +NFSV4_LAYOUT_MODULE_ALIAS (LAYOUT_NFSV4_1_FILES );static int __init nfs4filelayout_init (void ) {
fs/nfs/pnfs.h +2 -0
@@ -55,6 +55,8 @@ enum pnfs_try_status {#ifdef CONFIG_NFS_V4_1 #define LAYOUT_NFSV4_1_MODULE_PREFIX "nfs-layouttype4" +#define NFSV4_LAYOUT_MODULE_ALIAS (id) \ + MODULE_ALIAS(LAYOUT_NFSV4_1_MODULE_PREFIX "-" #id)enum { NFS_LAYOUT_RO_FAILED = 0, /* get ro layout failed stop trying */
Signature · 1 line
1.7.3.4