Merge branch 'devel' into next
Conflicts: fs/nfs/file.c Fix up the conflict with Jon Corbet's bkl-removal tree
This commit is contained in:
commit
e89e896d31
35 changed files with 1851 additions and 1166 deletions
|
@ -44,6 +44,13 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* These mimic similar macros defined in user-space for inet_ntop(3).
|
||||
* See /usr/include/netinet/in.h .
|
||||
*/
|
||||
#define INET_ADDRSTRLEN (16)
|
||||
#define INET6_ADDRSTRLEN (48)
|
||||
|
||||
extern __be32 in_aton(const char *str);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
|
|
|
@ -12,9 +12,19 @@
|
|||
#include <linux/magic.h>
|
||||
|
||||
/* Default timeout values */
|
||||
#define NFS_DEF_UDP_TIMEO (11)
|
||||
#define NFS_DEF_UDP_RETRANS (3)
|
||||
#define NFS_DEF_TCP_TIMEO (600)
|
||||
#define NFS_DEF_TCP_RETRANS (2)
|
||||
|
||||
#define NFS_MAX_UDP_TIMEOUT (60*HZ)
|
||||
#define NFS_MAX_TCP_TIMEOUT (600*HZ)
|
||||
|
||||
#define NFS_DEF_ACREGMIN (3)
|
||||
#define NFS_DEF_ACREGMAX (60)
|
||||
#define NFS_DEF_ACDIRMIN (30)
|
||||
#define NFS_DEF_ACDIRMAX (60)
|
||||
|
||||
/*
|
||||
* When flushing a cluster of dirty pages, there can be different
|
||||
* strategies:
|
||||
|
|
119
include/linux/nfs_iostat.h
Normal file
119
include/linux/nfs_iostat.h
Normal file
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* User-space visible declarations for NFS client per-mount
|
||||
* point statistics
|
||||
*
|
||||
* Copyright (C) 2005, 2006 Chuck Lever <cel@netapp.com>
|
||||
*
|
||||
* NFS client per-mount statistics provide information about the
|
||||
* health of the NFS client and the health of each NFS mount point.
|
||||
* Generally these are not for detailed problem diagnosis, but
|
||||
* simply to indicate that there is a problem.
|
||||
*
|
||||
* These counters are not meant to be human-readable, but are meant
|
||||
* to be integrated into system monitoring tools such as "sar" and
|
||||
* "iostat". As such, the counters are sampled by the tools over
|
||||
* time, and are never zeroed after a file system is mounted.
|
||||
* Moving averages can be computed by the tools by taking the
|
||||
* difference between two instantaneous samples and dividing that
|
||||
* by the time between the samples.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_NFS_IOSTAT
|
||||
#define _LINUX_NFS_IOSTAT
|
||||
|
||||
#define NFS_IOSTAT_VERS "1.0"
|
||||
|
||||
/*
|
||||
* NFS byte counters
|
||||
*
|
||||
* 1. SERVER - the number of payload bytes read from or written
|
||||
* to the server by the NFS client via an NFS READ or WRITE
|
||||
* request.
|
||||
*
|
||||
* 2. NORMAL - the number of bytes read or written by applications
|
||||
* via the read(2) and write(2) system call interfaces.
|
||||
*
|
||||
* 3. DIRECT - the number of bytes read or written from files
|
||||
* opened with the O_DIRECT flag.
|
||||
*
|
||||
* These counters give a view of the data throughput into and out
|
||||
* of the NFS client. Comparing the number of bytes requested by
|
||||
* an application with the number of bytes the client requests from
|
||||
* the server can provide an indication of client efficiency
|
||||
* (per-op, cache hits, etc).
|
||||
*
|
||||
* These counters can also help characterize which access methods
|
||||
* are in use. DIRECT by itself shows whether there is any O_DIRECT
|
||||
* traffic. NORMAL + DIRECT shows how much data is going through
|
||||
* the system call interface. A large amount of SERVER traffic
|
||||
* without much NORMAL or DIRECT traffic shows that applications
|
||||
* are using mapped files.
|
||||
*
|
||||
* NFS page counters
|
||||
*
|
||||
* These count the number of pages read or written via nfs_readpage(),
|
||||
* nfs_readpages(), or their write equivalents.
|
||||
*
|
||||
* NB: When adding new byte counters, please include the measured
|
||||
* units in the name of each byte counter to help users of this
|
||||
* interface determine what exactly is being counted.
|
||||
*/
|
||||
enum nfs_stat_bytecounters {
|
||||
NFSIOS_NORMALREADBYTES = 0,
|
||||
NFSIOS_NORMALWRITTENBYTES,
|
||||
NFSIOS_DIRECTREADBYTES,
|
||||
NFSIOS_DIRECTWRITTENBYTES,
|
||||
NFSIOS_SERVERREADBYTES,
|
||||
NFSIOS_SERVERWRITTENBYTES,
|
||||
NFSIOS_READPAGES,
|
||||
NFSIOS_WRITEPAGES,
|
||||
__NFSIOS_BYTESMAX,
|
||||
};
|
||||
|
||||
/*
|
||||
* NFS event counters
|
||||
*
|
||||
* These counters provide a low-overhead way of monitoring client
|
||||
* activity without enabling NFS trace debugging. The counters
|
||||
* show the rate at which VFS requests are made, and how often the
|
||||
* client invalidates its data and attribute caches. This allows
|
||||
* system administrators to monitor such things as how close-to-open
|
||||
* is working, and answer questions such as "why are there so many
|
||||
* GETATTR requests on the wire?"
|
||||
*
|
||||
* They also count anamolous events such as short reads and writes,
|
||||
* silly renames due to close-after-delete, and operations that
|
||||
* change the size of a file (such operations can often be the
|
||||
* source of data corruption if applications aren't using file
|
||||
* locking properly).
|
||||
*/
|
||||
enum nfs_stat_eventcounters {
|
||||
NFSIOS_INODEREVALIDATE = 0,
|
||||
NFSIOS_DENTRYREVALIDATE,
|
||||
NFSIOS_DATAINVALIDATE,
|
||||
NFSIOS_ATTRINVALIDATE,
|
||||
NFSIOS_VFSOPEN,
|
||||
NFSIOS_VFSLOOKUP,
|
||||
NFSIOS_VFSACCESS,
|
||||
NFSIOS_VFSUPDATEPAGE,
|
||||
NFSIOS_VFSREADPAGE,
|
||||
NFSIOS_VFSREADPAGES,
|
||||
NFSIOS_VFSWRITEPAGE,
|
||||
NFSIOS_VFSWRITEPAGES,
|
||||
NFSIOS_VFSGETDENTS,
|
||||
NFSIOS_VFSSETATTR,
|
||||
NFSIOS_VFSFLUSH,
|
||||
NFSIOS_VFSFSYNC,
|
||||
NFSIOS_VFSLOCK,
|
||||
NFSIOS_VFSRELEASE,
|
||||
NFSIOS_CONGESTIONWAIT,
|
||||
NFSIOS_SETATTRTRUNC,
|
||||
NFSIOS_EXTENDWRITE,
|
||||
NFSIOS_SILLYRENAME,
|
||||
NFSIOS_SHORTREAD,
|
||||
NFSIOS_SHORTWRITE,
|
||||
NFSIOS_DELAY,
|
||||
__NFSIOS_COUNTSMAX,
|
||||
};
|
||||
|
||||
#endif /* _LINUX_NFS_IOSTAT */
|
|
@ -27,9 +27,12 @@
|
|||
/*
|
||||
* Valid flags for a dirty buffer
|
||||
*/
|
||||
#define PG_BUSY 0
|
||||
#define PG_NEED_COMMIT 1
|
||||
#define PG_NEED_RESCHED 2
|
||||
enum {
|
||||
PG_BUSY = 0,
|
||||
PG_CLEAN,
|
||||
PG_NEED_COMMIT,
|
||||
PG_NEED_RESCHED,
|
||||
};
|
||||
|
||||
struct nfs_inode;
|
||||
struct nfs_page {
|
||||
|
|
|
@ -829,9 +829,8 @@ struct nfs_rpc_ops {
|
|||
int (*write_done) (struct rpc_task *, struct nfs_write_data *);
|
||||
void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
|
||||
int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
|
||||
int (*file_open) (struct inode *, struct file *);
|
||||
int (*file_release) (struct inode *, struct file *);
|
||||
int (*lock)(struct file *, int, struct file_lock *);
|
||||
int (*lock_check_bounds)(const struct file_lock *);
|
||||
void (*clear_acl_cache)(struct inode *);
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ struct rpc_clnt {
|
|||
|
||||
unsigned int cl_softrtry : 1,/* soft timeouts */
|
||||
cl_discrtry : 1,/* disconnect before retry */
|
||||
cl_autobind : 1;/* use getport() */
|
||||
cl_autobind : 1,/* use getport() */
|
||||
cl_chatty : 1;/* be verbose */
|
||||
|
||||
struct rpc_rtt * cl_rtt; /* RTO estimator data */
|
||||
const struct rpc_timeout *cl_timeout; /* Timeout strategy */
|
||||
|
@ -114,6 +115,7 @@ struct rpc_create_args {
|
|||
#define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3)
|
||||
#define RPC_CLNT_CREATE_NOPING (1UL << 4)
|
||||
#define RPC_CLNT_CREATE_DISCRTRY (1UL << 5)
|
||||
#define RPC_CLNT_CREATE_QUIET (1UL << 6)
|
||||
|
||||
struct rpc_clnt *rpc_create(struct rpc_create_args *args);
|
||||
struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
|
||||
|
@ -123,6 +125,9 @@ void rpc_shutdown_client(struct rpc_clnt *);
|
|||
void rpc_release_client(struct rpc_clnt *);
|
||||
|
||||
int rpcb_register(u32, u32, int, unsigned short, int *);
|
||||
int rpcb_v4_register(const u32 program, const u32 version,
|
||||
const struct sockaddr *address,
|
||||
const char *netid, int *result);
|
||||
int rpcb_getport_sync(struct sockaddr_in *, u32, u32, int);
|
||||
void rpcb_getport_async(struct rpc_task *);
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@ struct rpc_task_setup {
|
|||
#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
|
||||
#define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
|
||||
#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
|
||||
#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
|
||||
#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
|
||||
|
||||
#define RPC_TASK_RUNNING 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue