diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 1 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 | ||||
-rw-r--r-- | fs/nfs/super.c | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 64118316a407..277407df6d47 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -372,6 +372,7 @@ struct dentry *nfs4_try_mount(int, const char *, struct nfs_mount_info *, struct | |||
372 | extern bool nfs4_disable_idmapping; | 372 | extern bool nfs4_disable_idmapping; |
373 | extern unsigned short max_session_slots; | 373 | extern unsigned short max_session_slots; |
374 | extern unsigned short send_implementation_id; | 374 | extern unsigned short send_implementation_id; |
375 | extern bool recover_lost_locks; | ||
375 | 376 | ||
376 | #define NFS4_CLIENT_ID_UNIQ_LEN (64) | 377 | #define NFS4_CLIENT_ID_UNIQ_LEN (64) |
377 | extern char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN]; | 378 | extern char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN]; |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1eb694e0f305..535011a27415 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -5523,12 +5523,6 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request | |||
5523 | return err; | 5523 | return err; |
5524 | } | 5524 | } |
5525 | 5525 | ||
5526 | bool recover_locks = true; | ||
5527 | module_param(recover_locks, bool, 0644); | ||
5528 | MODULE_PARM_DESC(recover_locks, | ||
5529 | "If the server reports that a lock might be lost, " | ||
5530 | "try to recovery it risking corruption."); | ||
5531 | |||
5532 | static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) | 5526 | static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) |
5533 | { | 5527 | { |
5534 | struct nfs_server *server = NFS_SERVER(state->inode); | 5528 | struct nfs_server *server = NFS_SERVER(state->inode); |
@@ -5540,7 +5534,7 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request | |||
5540 | err = nfs4_set_lock_state(state, request); | 5534 | err = nfs4_set_lock_state(state, request); |
5541 | if (err != 0) | 5535 | if (err != 0) |
5542 | return err; | 5536 | return err; |
5543 | if (!recover_locks) { | 5537 | if (!recover_lost_locks) { |
5544 | set_bit(NFS_LOCK_LOST, &request->fl_u.nfs4_fl.owner->ls_flags); | 5538 | set_bit(NFS_LOCK_LOST, &request->fl_u.nfs4_fl.owner->ls_flags); |
5545 | return 0; | 5539 | return 0; |
5546 | } | 5540 | } |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index f2071d221c77..6ad9053d8906 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2758,6 +2758,7 @@ bool nfs4_disable_idmapping = true; | |||
2758 | unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE; | 2758 | unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE; |
2759 | unsigned short send_implementation_id = 1; | 2759 | unsigned short send_implementation_id = 1; |
2760 | char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN] = ""; | 2760 | char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN] = ""; |
2761 | bool recover_lost_locks = false; | ||
2761 | 2762 | ||
2762 | EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport); | 2763 | EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport); |
2763 | EXPORT_SYMBOL_GPL(nfs_callback_tcpport); | 2764 | EXPORT_SYMBOL_GPL(nfs_callback_tcpport); |
@@ -2766,6 +2767,7 @@ EXPORT_SYMBOL_GPL(nfs4_disable_idmapping); | |||
2766 | EXPORT_SYMBOL_GPL(max_session_slots); | 2767 | EXPORT_SYMBOL_GPL(max_session_slots); |
2767 | EXPORT_SYMBOL_GPL(send_implementation_id); | 2768 | EXPORT_SYMBOL_GPL(send_implementation_id); |
2768 | EXPORT_SYMBOL_GPL(nfs4_client_id_uniquifier); | 2769 | EXPORT_SYMBOL_GPL(nfs4_client_id_uniquifier); |
2770 | EXPORT_SYMBOL_GPL(recover_lost_locks); | ||
2769 | 2771 | ||
2770 | #define NFS_CALLBACK_MAXPORTNR (65535U) | 2772 | #define NFS_CALLBACK_MAXPORTNR (65535U) |
2771 | 2773 | ||
@@ -2803,4 +2805,10 @@ MODULE_PARM_DESC(send_implementation_id, | |||
2803 | "Send implementation ID with NFSv4.1 exchange_id"); | 2805 | "Send implementation ID with NFSv4.1 exchange_id"); |
2804 | MODULE_PARM_DESC(nfs4_unique_id, "nfs_client_id4 uniquifier string"); | 2806 | MODULE_PARM_DESC(nfs4_unique_id, "nfs_client_id4 uniquifier string"); |
2805 | 2807 | ||
2808 | module_param(recover_lost_locks, bool, 0644); | ||
2809 | MODULE_PARM_DESC(recover_lost_locks, | ||
2810 | "If the server reports that a lock might be lost, " | ||
2811 | "try to recover it risking data corruption."); | ||
2812 | |||
2813 | |||
2806 | #endif /* CONFIG_NFS_V4 */ | 2814 | #endif /* CONFIG_NFS_V4 */ |