remove lustre filesystem
by Marcin Dulak
Hi,
i have currently two lustre filesystems (fs1, fs2) managed by the same mgs:
# cat /proc/fs/lustre/mgs/MGS/filesystems
params
fs1
fs2
mdt is formatted to allow multiple filesystems:
# tunefs.lustre --dryrun /dev/mapper/mgt
Reading CONFIGS/mountdata
Read previous values:
Target: MGS
Index: unassigned
Lustre FS:
Mount type: ldiskfs
Flags: 0x1004
(MGS no_primnode )
Persistent mount opts: user_xattr,errors=remount-ro
I've umounted all ost/mdt related to fs2, and want to get rid of fs2
completely.
How to achieve that?
Marcin
5 years, 5 months
[PATCH] Staging: lustre: ptlrpc: Make struct static
by Shraddha Barke
Make struct static and remove definition from header file since the
struct is accessed only in this particular file
Signed-off-by: Shraddha Barke <shraddha.6596(a)gmail.com>
---
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +-
drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
index 34c7e28..f1b2538 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
@@ -46,7 +46,7 @@ struct obd_import;
struct ldlm_res_id;
struct ptlrpc_request_set;
extern int test_req_buffer_pressure;
-extern struct mutex ptlrpc_all_services_mutex;
+
int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait);
/* ptlrpcd.c */
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 40de622..405cc0e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -67,7 +67,7 @@ static void ptlrpc_at_remove_timed(struct ptlrpc_request *req);
/** Holds a list of all PTLRPC services */
LIST_HEAD(ptlrpc_all_services);
/** Used to protect the \e ptlrpc_all_services list */
-struct mutex ptlrpc_all_services_mutex;
+static struct mutex ptlrpc_all_services_mutex;
static struct ptlrpc_request_buffer_desc *
ptlrpc_alloc_rqbd(struct ptlrpc_service_part *svcpt)
--
2.1.4
5 years, 5 months
[PATCH 00/37] staging/lustre: y2038 rework
by Arnd Bergmann
First of all, sorry for the overly long series that this turned into.
I'm currently doing a survey of all code using time_t/timeval/timespec
to get an idea of what work needs to be done where, in particular in
terms of user interface changes.
Lustre is by far the most pervasive user of time types and functions,
and I could not even find my way through the code to see what needs
to be done other than actually doing that work.
On most other subsystems, we try to use montonic times where possible
for in-kernel uses. I did not do that here but kept using wall-clock
times, in order to leave the debug output and procfs files untouched.
A follow-up series could convert a lot of the ktime_get_real_*() to
ktime_get_*() to change that if we don't care about the format.
There are a couple of things that I left unchanged:
- Socket timestamps in drivers/staging/lustre/lnet/lnet/lib-socket.c
need to wait for the socket API to be changed first
- inode timestamps need to be changed in VFS, which is a larger work
- The conrpc selftest has a user interface based on timeval that is
hard to change.
All patches are based on staging-testing and built-tested on 32-bit
arm and x86 as well as 64-bit arm.
Arnd Bergmann (37):
staging/lustre: use jiffies for lp_last_query times
staging/lustre: use 64-bit inode timestamps internally
staging/lustre: obd: remove unused data structures
staging/lustre: tracefile: use 64-bit seconds
staging/lustre: use 64-bit timestamps in procfs output
staging/lustre: use time64_t for l_last_activity
staging/lustre: use ktime_t for calculating elapsed time
staging/lustre: change rq_at_index type
staging/lustre: avoid unnecessary timeval conversion
staging/lustre: use 64-bit time LNetCtl()
staging/lustre: use 'long' return type for cfs_duration_sec()
staging/lustre: use jiffies_to_timeval() instead of cfs_duration_usec
staging/lustre: use 64-bit ibn_incarnation computation
staging/lustre: use 64-bit times for lnet_shuffle_seed
staging/lustre: use 64-bit computation in s2dhms()
staging/lustre: use 64-bit timestamps for selftest
staging/lustre: use 64-bit time for pl_recalc
staging/lustre: use 64-bit time for obd eviction
staging/lustre: use 64-bit time for procfs output
staging/lustre: use 64-bit time for adaptive timeout
staging/lustre: use 64-bit llite procfs timestamps
staging/lustre: use 64-bit times for ksnd_connd
staging/lustre: use 64-bit time for ni_last_alive
staging/lustre: use 64-bit time for selftest
staging/lustre: partially use time64_t for capa expiry
staging/lustre: use 64-bit times in ptlrpc_enc_page_pool
staging/lustre: use 64-bit times in debug print
staging/lustre: use 64-bit times in another debug print
staging/lustre: use 64-bit timestamps for mdc
staging/lustre: use 64-bit times for ptlrpc sec expiry
staging/lustre: use 64-bit times for ptlrpc_sec
staging/lustre: use 64-bit times for exp_last_request_time
staging/lustre: use 64-bit times for request times
staging/lustre: remove a bit of dead code
staging/lustre: remove wrappers for timer functions
staging/lustre: remove unused time handling functions
staging/lustre: remove CFS_TIME_T definition
.../lustre/include/linux/libcfs/libcfs_debug.h | 4 +-
.../lustre/include/linux/libcfs/libcfs_prim.h | 13 --
.../lustre/include/linux/libcfs/libcfs_time.h | 49 --------
.../lustre/include/linux/libcfs/linux/linux-time.h | 35 +-----
.../staging/lustre/include/linux/lnet/lib-lnet.h | 2 +-
.../staging/lustre/include/linux/lnet/lib-types.h | 2 +-
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 6 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 8 +-
drivers/staging/lustre/lnet/lnet/api-ni.c | 6 +-
drivers/staging/lustre/lnet/lnet/config.c | 2 +-
drivers/staging/lustre/lnet/lnet/lib-eq.c | 9 +-
drivers/staging/lustre/lnet/lnet/lib-move.c | 4 +-
drivers/staging/lustre/lnet/lnet/router.c | 10 +-
drivers/staging/lustre/lnet/lnet/router_proc.c | 2 +-
drivers/staging/lustre/lnet/selftest/conctl.c | 2 +-
drivers/staging/lustre/lnet/selftest/conrpc.c | 10 +-
drivers/staging/lustre/lnet/selftest/console.c | 2 +-
drivers/staging/lustre/lnet/selftest/console.h | 2 +-
drivers/staging/lustre/lnet/selftest/framework.c | 5 +-
drivers/staging/lustre/lnet/selftest/ping_test.c | 12 +-
drivers/staging/lustre/lnet/selftest/rpc.c | 9 +-
drivers/staging/lustre/lnet/selftest/selftest.h | 2 +-
drivers/staging/lustre/lnet/selftest/timer.c | 14 +--
drivers/staging/lustre/lnet/selftest/timer.h | 2 +-
drivers/staging/lustre/lustre/include/cl_object.h | 6 +-
.../staging/lustre/lustre/include/lprocfs_status.h | 6 +-
.../lustre/lustre/include/lustre/lustre_idl.h | 1 +
.../staging/lustre/lustre/include/lustre_capa.h | 16 ++-
drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +-
.../staging/lustre/lustre/include/lustre_export.h | 7 +-
.../staging/lustre/lustre/include/lustre_import.h | 14 +--
drivers/staging/lustre/lustre/include/lustre_net.h | 24 ++--
drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
drivers/staging/lustre/lustre/include/obd.h | 97 +--------------
drivers/staging/lustre/lustre/include/obd_class.h | 2 +-
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +-
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 30 ++---
drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 29 ++---
drivers/staging/lustre/lustre/libcfs/debug.c | 4 +-
.../lustre/lustre/libcfs/linux/linux-prim.c | 70 -----------
.../lustre/lustre/libcfs/linux/linux-tracefile.c | 8 +-
drivers/staging/lustre/lustre/libcfs/module.c | 3 -
drivers/staging/lustre/lustre/llite/file.c | 2 +-
.../staging/lustre/lustre/llite/llite_internal.h | 2 +-
drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +-
drivers/staging/lustre/lustre/llite/lproc_llite.c | 24 ++--
drivers/staging/lustre/lustre/llite/super25.c | 6 +-
drivers/staging/lustre/lustre/llite/vvp_io.c | 4 +-
drivers/staging/lustre/lustre/llite/vvp_object.c | 12 +-
drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +-
drivers/staging/lustre/lustre/obdclass/genops.c | 6 +-
drivers/staging/lustre/lustre/obdclass/llog.c | 2 +-
.../lustre/lustre/obdclass/lprocfs_status.c | 27 ++---
.../lustre/lustre/obdclass/lustre_handles.c | 6 +-
.../staging/lustre/lustre/obdclass/obd_config.c | 13 +-
.../staging/lustre/lustre/obdecho/echo_client.c | 4 +-
drivers/staging/lustre/lustre/osc/lproc_osc.c | 16 +--
drivers/staging/lustre/lustre/osc/osc_io.c | 6 +-
drivers/staging/lustre/lustre/osc/osc_request.c | 4 +-
drivers/staging/lustre/lustre/ptlrpc/client.c | 48 ++++----
drivers/staging/lustre/lustre/ptlrpc/events.c | 8 +-
drivers/staging/lustre/lustre/ptlrpc/import.c | 14 +--
.../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 16 +--
drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 10 +-
.../staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +-
drivers/staging/lustre/lustre/ptlrpc/pinger.c | 29 +++--
drivers/staging/lustre/lustre/ptlrpc/sec.c | 28 ++---
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 29 +++--
drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +-
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 6 +-
drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 4 +-
drivers/staging/lustre/lustre/ptlrpc/service.c | 135 +++++++++++----------
77 files changed, 380 insertions(+), 652 deletions(-)
--
2.1.0.rc2
5 years, 5 months
Re: [HPDD-discuss] [PATCH 19/37] staging/lustre: use 64-bit time for procfs output
by Arnd Bergmann
On Thursday 24 September 2015 10:40:09 Sudip Mukherjee wrote:
> On Wed, Sep 23, 2015 at 09:13:42PM +0200, Arnd Bergmann wrote:
> > This time is only printed in procfs, and can be easily converted
> > to 64-bit to avoid overflowing on 32-bit systems in 2038.
> >
> > Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
> > ---
> This introduces new build warnings:
>
> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c: In function ‘lprocfs_rd_timeouts’:
> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c:894:10: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘time64_t’ [-Wformat=]
> "network", cur, worst, worstt, DHMS_VARS(&ts));
> ^
> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c:906:11: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘time64_t’ [-Wformat=]
> cur, worst, worstt, DHMS_VARS(&ts));
> ^
Sorry about that. I checked all the patches for new warnings but then only did
a partial check after rebasing to staging-testing. I'll fix it up and run the
full tests again.
Arnd
5 years, 5 months
[PATCH] staging: lustre: lustre: libcfs: Added a blank line
by Anjali Menon
Added a blank line after declaration. Coding style
warning detected by checkpatch.pl
WARNING: Missing a blank line after declarations
Signed-off-by: Anjali Menon <cse.anjalimenon(a)gmail.com>
---
drivers/staging/lustre/lustre/libcfs/module.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index f0ee76a..7d0427b 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -334,6 +334,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd,
default: {
struct libcfs_ioctl_handler *hand;
+
err = -EINVAL;
down_read(&ioctl_list_sem);
list_for_each_entry(hand, &ioctl_list, item) {
--
1.9.1
5 years, 5 months
[PATCH] staging: lustre: lustre: obdclass: Removed a space
by Anjali Menon
Removed a space to fix the following coding style error detected
by checkpatch.pl
ERROR: space prohibited before that '++' (ctx:WxO)
Signed-off-by: Anjali Menon <cse.anjalimenon(a)gmail.com>
---
drivers/staging/lustre/lustre/obdclass/llog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c
index 114be4a..bb7f912 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog.c
@@ -522,7 +522,7 @@ int llog_reverse_process(const struct lu_env *env,
rec = (void *)rec + rec->lrh_len;
if (LLOG_REC_HDR_NEEDS_SWABBING(rec))
lustre_swab_llog_rec(rec);
- idx ++;
+ idx++;
}
LASSERT(idx == index);
tail = (void *)rec + rec->lrh_len - sizeof(*tail);
--
1.9.1
5 years, 5 months
[PATCH] staging/lustre: use __noreturn for lbug_with_loc
by Juston Li
fixes sparse error:
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c:149:6: error:
symbol 'lbug_with_loc'redeclared with different type (originally declared at
drivers/staging/lustre/lustre/libcfs/linux/../../../include/linux/libcfs/libcfs_private.h:82)
- different modifiers
Use the __noreturn macro instead of __attribute__((noreturn))
The macro is exactly that but its usage seems more common and
it is bit more readable.
Signed-off-by: Juston Li <juston.h.li(a)gmail.com>
---
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 2 +-
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 9544860..6af733d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -79,7 +79,7 @@ do { \
#define KLASSERT(e) LASSERT(e)
-void lbug_with_loc(struct libcfs_debug_msg_data *)__attribute__((noreturn));
+void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *);
#define LBUG() \
do { \
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
index 4545d54..8689ea7 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
@@ -146,7 +146,7 @@ void libcfs_run_lbug_upcall(struct libcfs_debug_msg_data *msgdata)
}
/* coverity[+kill] */
-void lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
+void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
{
libcfs_catastrophe = 1;
libcfs_debug_msg(msgdata, "LBUG\n");
--
2.5.2
5 years, 5 months
[PATCH] nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations
by Jeff Layton
With NFSv3 nfsd will always attempt to send along WCC data to the
client. This generally involves saving off the in-core inode information
prior to doing the operation on the given filehandle, and then issuing a
vfs_getattr to it after the op.
Some filesystems (particularly clustered or networked ones) have an
expensive ->getattr inode operation. Atomicitiy is also often difficult
or impossible to guarantee on such filesystems. For those, we're best
off not trying to provide WCC information to the client at all, and to
simply allow it to poll for that information as needed with a GETATTR
RPC.
This patch adds a new flags field to struct export_operations, and
defines a new EXPORT_OP_NOWCC flag that filesystems can use to indicate
that nfsd should not attempt to provide WCC info in NFSv3 replies. It
also adds a blurb about the new flags field and flag to the exporting
documentation.
The server will also now skip collecting this information for NFSv2 as
well, since that info is never used there anyway.
Note that this patch does not add this flag to any filesystem
export_operations structures. This was originally developed to allow
reexporting nfs via nfsd. That code is not (and may never be) suitable
for merging into mainline.
Other filesystems may want to consider enabling this flag too. It's hard
to tell however which ones have export operations to enable export via
knfsd and which ones mostly rely on them for open-by-filehandle support,
so I'm leaving that up to the individual maintainers to decide. I am
cc'ing the relevant lists for those filesystems that I think may want to
consider adding this though.
Cc: HPDD-discuss(a)lists.01.org
Cc: ceph-devel(a)vger.kernel.org
Cc: cluster-devel(a)redhat.com
Cc: fuse-devel(a)lists.sourceforge.net
Cc: ocfs2-devel(a)oss.oracle.com
Signed-off-by: Jeff Layton <jeff.layton(a)primarydata.com>
---
Documentation/filesystems/nfs/Exporting | 27 +++++++++++++++++++++++++++
fs/nfsd/nfs3xdr.c | 5 ++++-
fs/nfsd/nfsfh.c | 14 ++++++++++++++
fs/nfsd/nfsfh.h | 5 ++++-
include/linux/exportfs.h | 2 ++
5 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/Documentation/filesystems/nfs/Exporting b/Documentation/filesystems/nfs/Exporting
index 520a4becb75c..fa636cde3907 100644
--- a/Documentation/filesystems/nfs/Exporting
+++ b/Documentation/filesystems/nfs/Exporting
@@ -138,6 +138,11 @@ struct which has the following members:
to find potential names, and matches inode numbers to find the correct
match.
+ flags
+ Some filesystems may need to be handled differently than others. The
+ export_operations struct also includes a flags field that allows the
+ filesystem to communicate such information to nfsd. See the Export
+ Operations Flags section below for more explanation.
A filehandle fragment consists of an array of 1 or more 4byte words,
together with a one byte "type".
@@ -147,3 +152,25 @@ generated by encode_fh, in which case it will have been padded with
nuls. Rather, the encode_fh routine should choose a "type" which
indicates the decode_fh how much of the filehandle is valid, and how
it should be interpreted.
+
+Export Operations Flags
+-----------------------
+In addition to the operation vector pointers, struct export_operations also
+contains a "flags" field that allows the filesystem to communicate to nfsd
+that it may want to do things differently when dealing with it. The
+following flags are defined:
+
+ EXPORT_OP_NOWCC
+ RFC 1813 recommends that servers always send weak cache consistency
+ (WCC) data to the client after each operation. The server should
+ atomically collect attributes about the inode, do an operation on it,
+ and then collect the attributes afterward. This allows the client to
+ skip issuing GETATTRs in some situations but means that the server
+ is calling vfs_getattr for almost all RPCs. On some filesystems
+ (particularly those that are clustered or networked) this is expensive
+ and atomicity is difficult to guarantee. This flag indicates to nfsd
+ that it should skip providing WCC attributes to the client in NFSv3
+ replies when doing operations on this filesystem. Consider enabling
+ this on filesystems that have an expensive ->getattr inode operation,
+ or when atomicity between pre and post operation attribute collection
+ is impossible to guarantee.
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 01dcd494f781..c30c8c604e2a 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -203,7 +203,7 @@ static __be32 *
encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
{
struct dentry *dentry = fhp->fh_dentry;
- if (dentry && d_really_is_positive(dentry)) {
+ if (!fhp->fh_no_wcc && dentry && d_really_is_positive(dentry)) {
__be32 err;
struct kstat stat;
@@ -256,6 +256,9 @@ void fill_post_wcc(struct svc_fh *fhp)
{
__be32 err;
+ if (fhp->fh_no_wcc)
+ return;
+
if (fhp->fh_post_saved)
printk("nfsd: inode locked twice during operation.\n");
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 350041a40fe5..29ae37f62b9b 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -267,6 +267,16 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
fhp->fh_dentry = dentry;
fhp->fh_export = exp;
+
+ switch (rqstp->rq_vers) {
+ case 3:
+ if (!(dentry->d_sb->s_export_op->flags & EXPORT_OP_NOWCC))
+ break;
+ /* Fallthrough */
+ case 2:
+ fhp->fh_no_wcc = true;
+ }
+
return 0;
out:
exp_put(exp);
@@ -535,6 +545,9 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
*/
set_version_and_fsid_type(fhp, exp, ref_fh);
+ /* If we have a ref_fh, then copy the fh_no_wcc setting from it. */
+ fhp->fh_no_wcc = ref_fh ? ref_fh->fh_no_wcc : false;
+
if (ref_fh == fhp)
fh_put(ref_fh);
@@ -641,6 +654,7 @@ fh_put(struct svc_fh *fhp)
exp_put(exp);
fhp->fh_export = NULL;
}
+ fhp->fh_no_wcc = false;
return;
}
diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h
index 1e90dad4926b..9ddead4d98f8 100644
--- a/fs/nfsd/nfsfh.h
+++ b/fs/nfsd/nfsfh.h
@@ -32,6 +32,7 @@ typedef struct svc_fh {
unsigned char fh_locked; /* inode locked by us */
unsigned char fh_want_write; /* remount protection taken */
+ bool fh_no_wcc; /* no wcc data needed */
#ifdef CONFIG_NFSD_V3
unsigned char fh_post_saved; /* post-op attrs saved */
@@ -51,7 +52,6 @@ typedef struct svc_fh {
struct kstat fh_post_attr; /* full attrs after operation */
u64 fh_post_change; /* nfsv4 change; see above */
#endif /* CONFIG_NFSD_V3 */
-
} svc_fh;
enum nfsd_fsid {
@@ -225,6 +225,9 @@ fill_pre_wcc(struct svc_fh *fhp)
{
struct inode *inode;
+ if (fhp->fh_no_wcc)
+ return;
+
inode = d_inode(fhp->fh_dentry);
if (!fhp->fh_pre_saved) {
fhp->fh_pre_mtime = inode->i_mtime;
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index fa05e04c5531..600c3fccc999 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -214,6 +214,8 @@ struct export_operations {
bool write, u32 *device_generation);
int (*commit_blocks)(struct inode *inode, struct iomap *iomaps,
int nr_iomaps, struct iattr *iattr);
+#define EXPORT_OP_NOWCC (0x1) /* Don't collect wcc data for NFSv3 replies */
+ unsigned long flags;
};
extern int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid,
--
2.4.3
5 years, 5 months
[PATCH] Staging: lustre: lustre: lov: lov_dev.c: Added missing blank line
by Sakshi Vaid
Added a missing blank line after declarations.
158: WARNING: Missing a blank line after declarations
183: WARNING: Missing a blank line after declarations
Signed-off-by: Sakshi Vaid <sakshivaid95(a)gmail.com>
---
drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++--
drivers/staging/lustre/lustre/lov/lov_dev.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index d31bf73..68cf1b7 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -828,8 +828,8 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
* --bug 17336 */
loff_t size = cl_isize_read(inode);
loff_t cur_index = start >> PAGE_CACHE_SHIFT;
- loff_t size_index = ((size - 1)
- >> PAGE_CACHE_SHIFT);
+ loff_t size_index =
+ ((size - 1) >> PAGE_CACHE_SHIFT);
if ((size == 0 && cur_index != 0) ||
size_index < cur_index)
diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c
index 796a015..aadb8f2 100644
--- a/drivers/staging/lustre/lustre/lov/lov_dev.c
+++ b/drivers/staging/lustre/lustre/lov/lov_dev.c
@@ -155,6 +155,7 @@ static void lov_key_fini(const struct lu_context *ctx,
struct lu_context_key *key, void *data)
{
struct lov_thread_info *info = data;
+
LINVRNT(list_empty(&info->lti_closure.clc_list));
OBD_SLAB_FREE_PTR(info, lov_thread_kmem);
}
@@ -180,6 +181,7 @@ static void lov_session_key_fini(const struct lu_context *ctx,
struct lu_context_key *key, void *data)
{
struct lov_session *info = data;
+
OBD_SLAB_FREE_PTR(info, lov_session_kmem);
}
--
1.9.1
5 years, 5 months
[PATCH 00/39] drop null test before destroy functions
by Julia Lawall
Recent commits to kernel/git/torvalds/linux.git have made the following
functions able to tolerate NULL arguments:
kmem_cache_destroy (commit 3942d29918522)
mempool_destroy (commit 4e3ca3e033d1)
dma_pool_destroy (commit 44d7175da6ea)
These patches remove the associated NULL tests for the files that I found
easy to compile test. If these changes are OK, I will address the
remainder later.
---
arch/x86/kvm/mmu.c | 6 --
block/bio-integrity.c | 7 --
block/bio.c | 7 --
block/blk-core.c | 3 -
block/elevator.c | 3 -
drivers/atm/he.c | 7 --
drivers/block/aoe/aoedev.c | 3 -
drivers/block/drbd/drbd_main.c | 21 ++-----
drivers/block/pktcdvd.c | 3 -
drivers/block/rbd.c | 6 --
drivers/dma/dmaengine.c | 6 --
drivers/firmware/google/gsmi.c | 3 -
drivers/gpu/drm/i915/i915_dma.c | 19 ++----
drivers/iommu/amd_iommu_init.c | 7 --
drivers/md/bcache/bset.c | 3 -
drivers/md/bcache/request.c | 3 -
drivers/md/bcache/super.c | 9 +--
drivers/md/dm-bufio.c | 3 -
drivers/md/dm-cache-target.c | 3 -
drivers/md/dm-crypt.c | 6 --
drivers/md/dm-io.c | 3 -
drivers/md/dm-log-userspace-base.c | 3 -
drivers/md/dm-region-hash.c | 4 -
drivers/md/dm.c | 13 +---
drivers/md/multipath.c | 3 -
drivers/md/raid1.c | 6 --
drivers/md/raid10.c | 9 +--
drivers/md/raid5.c | 3 -
drivers/mtd/nand/nandsim.c | 3 -
drivers/mtd/ubi/attach.c | 4 -
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 3 -
drivers/staging/lustre/lustre/llite/super25.c | 16 +----
drivers/staging/lustre/lustre/obdclass/genops.c | 24 ++------
drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 --
drivers/staging/rdma/hfi1/user_sdma.c | 3 -
drivers/thunderbolt/ctl.c | 3 -
drivers/usb/gadget/udc/bdc/bdc_core.c | 3 -
drivers/usb/gadget/udc/gr_udc.c | 3 -
drivers/usb/gadget/udc/mv_u3d_core.c | 3 -
drivers/usb/gadget/udc/mv_udc_core.c | 3 -
drivers/usb/host/fotg210-hcd.c | 12 +---
drivers/usb/host/fusbh200-hcd.c | 12 +---
drivers/usb/host/whci/init.c | 3 -
drivers/usb/host/xhci-mem.c | 12 +---
fs/btrfs/backref.c | 3 -
fs/btrfs/delayed-inode.c | 3 -
fs/btrfs/delayed-ref.c | 12 +---
fs/btrfs/disk-io.c | 3 -
fs/btrfs/extent_io.c | 6 --
fs/btrfs/extent_map.c | 3 -
fs/btrfs/file.c | 3 -
fs/btrfs/inode.c | 18 ++----
fs/btrfs/ordered-data.c | 3 -
fs/dlm/memory.c | 6 --
fs/ecryptfs/main.c | 3 -
fs/ext4/crypto.c | 9 +--
fs/ext4/extents_status.c | 3 -
fs/ext4/mballoc.c | 3 -
fs/f2fs/crypto.c | 9 +--
fs/gfs2/main.c | 29 ++--------
fs/jbd2/journal.c | 15 +----
fs/jbd2/revoke.c | 12 +---
fs/jbd2/transaction.c | 6 --
fs/jffs2/malloc.c | 27 +++------
fs/nfsd/nfscache.c | 6 --
fs/nilfs2/super.c | 12 +---
fs/ocfs2/dlm/dlmlock.c | 3 -
fs/ocfs2/dlm/dlmmaster.c | 16 +----
fs/ocfs2/super.c | 18 ++----
fs/ocfs2/uptodate.c | 3 -
lib/debugobjects.c | 3 -
net/core/sock.c | 12 +---
net/dccp/ackvec.c | 12 +---
net/dccp/ccid.c | 3 -
net/sunrpc/sched.c | 12 +---
75 files changed, 180 insertions(+), 381 deletions(-)
5 years, 5 months