Lustre patches
cover Lustre patches
This is rebase of the previous set that got merged only half-way with added signed-offs as requested.
I also added a patch to include James Simmons as a Lustre maintainer too since he is performing a lot of work in the area.
Al Viro (7):
ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore... ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec... ksocknal_lib_send_kiov(): sendmsg doesn't bugger iovec...
lustre: ->kss_scratch... are unused now
lustre: constify lib-move.c stuff
lustre: pass iov_iter to ->lnd_recv()
lustre: introduce lnet_copy_{k,}iov2iter(), kill
lnet_copy_{k,}iov2{k,}iov()Emoly Liu (3):
staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}' staging/lustre: Fix unnecessary parentheses around variables staging/lustre: Make alignment match open parenthesis
Oleg Drokin (3):
staging/lustre: Always return EEXIST on mkdir for existing names staging/lustre: Remove unused cp_error from struct cl_page Add James Simmons as another Lustre maintainer
MAINTAINERS | 1 + .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/include/linux/lnet/lib-lnet.h | 65 +--- .../staging/lustre/include/linux/lnet/lib-types.h | 5 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 3 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 64 ++-- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 10 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 21 +- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 89 ++---- .../lustre/lnet/libcfs/linux/linux-crypto.c | 4 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 329 +++++---------------- drivers/staging/lustre/lnet/lnet/lo.c | 39 +-- drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/lu_object.h | 3 +- .../lustre/lustre/include/lustre/lustre_idl.h | 42 +-- .../lustre/lustre/include/lustre/lustre_user.h | 4 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 13 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 14 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/dir.c | 5 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 25 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +- drivers/staging/lustre/lustre/llite/namei.c | 12 +- drivers/staging/lustre/lustre/llite/rw.c | 9 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/super25.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 22 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 18 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 +- drivers/staging/lustre/lustre/obdclass/debug.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 2 +- .../lustre/lustre/obdclass/lustre_handles.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 14 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 10 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 14 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 11 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 24 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 288 +++++++++--------- 69 files changed, 554 insertions(+), 849 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/13 ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore...
From: Al Viro <[email protected]>
--- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +5 -17
@@ -201,14 +201,7 @@ ksocknal_lib_eager_ack(struct ksock_conn *conn)int ksocknal_lib_recv_iov (struct ksock_conn *conn) { -#if SOCKNAL_SINGLE_FRAG_RX -struct kvec scratch; -struct kvec *scratchiov = &scratch; -unsigned int niov =1 ; -#else -struct kvec *scratchiov = conn->ksnc_scheduler->kss_scratch_iov;unsigned int niov = conn->ksnc_rx_niov; -#endif struct kvec *iov = conn->ksnc_rx_iov;struct msghdr msg = { .msg_flags =0
@@ -220,20 +213,15 @@ ksocknal_lib_recv_iov(struct ksock_conn *conn)int sum;__u32 saved_csum; -/* -* NB we can't trust socket ops to either consume our iovs -* or leave them alone. -*/ LASSERT (niov >0 ); -for (nob = i =0 ; i < niov; i++) { - scratchiov[i] = iov[i]; - nob += scratchiov[i].iov_len; - } +for (nob = i =0 ; i < niov; i++) + nob += iov[i].iov_len; +LASSERT (nob <= conn->ksnc_rx_nob_wanted); - rc =kernel_recvmsg (conn->ksnc_sock, &msg, scratchiov, niov, nob, -MSG_DONTWAIT ); +iov_iter_kvec (&msg.msg_iter,READ |ITER_KVEC , iov, niov, nob); + rc =sock_recvmsg (conn->ksnc_sock, &msg,MSG_DONTWAIT ); saved_csum =0 ;if (conn->ksnc_proto == &ksocknal_protocol_v2x) {
Signature · 1 line
2.7.4
PATCH 2/13 ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec...
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 38 ++++++---------------- 1 file changed, 10 insertions(+), 28 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +10 -28
@@ -73,9 +73,9 @@ ksocknal_lib_zc_capable(struct ksock_conn *conn)int ksocknal_lib_send_iov (struct ksock_conn *conn,struct ksock_tx *tx) { +struct msghdr msg = {.msg_flags =MSG_DONTWAIT };struct socket *sock = conn->ksnc_sock; -int nob; -int rc; +int nob, i; if (*ksocknal_tunables.ksnd_enable_csum && /* checksum enabled */ conn->ksnc_proto == &ksocknal_protocol_v2x && /* V2.x connection */
@@ -83,34 +83,16 @@ ksocknal_lib_send_iov(struct ksock_conn *conn, struct ksock_tx *tx) !tx->tx_msg.ksm_csum) /* not checksummed */ksocknal_lib_csum_tx (tx); -/* -* NB we can't trust socket ops to either consume our iovs -* or leave them alone. -*/ - { -#if SOCKNAL_SINGLE_FRAG_TX -struct kvec scratch; -struct kvec *scratchiov = &scratch; -unsigned int niov =1 ; -#else -struct kvec *scratchiov = conn->ksnc_scheduler->kss_scratch_iov; -unsigned int niov = tx->tx_niov; -#endif -struct msghdr msg = {.msg_flags =MSG_DONTWAIT }; -int i; - -for (nob = i =0 ; i < niov; i++) { - scratchiov[i] = tx->tx_iov[i]; - nob += scratchiov[i].iov_len; - } +for (nob = i =0 ; i < tx->tx_niov; i++) + nob += tx->tx_iov[i].iov_len; -if (!list_empty (&conn->ksnc_tx_queue) || - nob < tx->tx_resid) - msg.msg_flags |=MSG_MORE ; +if (!list_empty (&conn->ksnc_tx_queue) || + nob < tx->tx_resid) + msg.msg_flags |=MSG_MORE ; - rc =kernel_sendmsg (sock, &msg, scratchiov, niov, nob); - } -return rc; +iov_iter_kvec (&msg.msg_iter,WRITE |ITER_KVEC , + tx->tx_iov, tx->tx_niov, nob); +return sock_sendmsg (sock, &msg); }int
Signature · 1 line
2.7.4
PATCH 3/13 ksocknal_lib_send_kiov(): sendmsg doesn't bugger iovec...
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 29 ++++------------------ 1 file changed, 5 insertions(+), 24 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +5 -24
@@ -106,10 +106,6 @@ ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx)/* Not NOOP message */ LASSERT (tx->tx_lnetmsg); -/* -* NB we can't trust socket ops to either consume our iovs -* or leave them alone. -*/ if (tx->tx_msg.ksm_zc_cookies[0 ]) {/* Zero copy is enabled */ struct sock *sk = sock->sk;
@@ -132,34 +128,19 @@ ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx) rc =tcp_sendpage (sk, page, offset, fragsize, msgflg); } }else { -#if SOCKNAL_SINGLE_FRAG_TX || !SOCKNAL_RISK_KMAP_DEADLOCK -struct kvec scratch; -struct kvec *scratchiov = &scratch; -unsigned int niov =1 ; -#else -#ifdef CONFIG_HIGHMEM -#warning "XXX risk of kmap deadlock on multiple frags..." -#endif -struct kvec *scratchiov = conn->ksnc_scheduler->kss_scratch_iov; -unsigned int niov = tx->tx_nkiov; -#endif struct msghdr msg = {.msg_flags =MSG_DONTWAIT };int i; -for (nob = i =0 ; i < niov; i++) { - scratchiov[i].iov_base =kmap (kiov[i].bv_page) + - kiov[i].bv_offset; - nob += scratchiov[i].iov_len = kiov[i].bv_len; - } +for (nob = i =0 ; i < tx->tx_nkiov; i++) + nob += kiov[i].bv_len;if (!list_empty (&conn->ksnc_tx_queue) || nob < tx->tx_resid) msg.msg_flags |=MSG_MORE ; - rc =kernel_sendmsg (sock, &msg, (struct kvec *)scratchiov, niov, nob); - -for (i =0 ; i < niov; i++) -kunmap (kiov[i].bv_page); +iov_iter_bvec (&msg.msg_iter,WRITE |ITER_BVEC , + kiov, tx->tx_nkiov, nob); + rc =sock_sendmsg (sock, &msg); }return rc; }
Signature · 1 line
2.7.4
PATCH 4/13 lustre: ->kss_scratch... are unused now
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +0 -4
@@ -86,10 +86,6 @@ struct ksock_sched { /* per scheduler state */int kss_nconns;/* # connections assigned to * this scheduler */ struct ksock_sched_info *kss_info;/* owner of it */ -union { -struct bio_vec kss_scratch_bvec[LNET_MAX_IOV ]; -struct kvec kss_scratch_iov[LNET_MAX_IOV ]; - }; };struct ksock_sched_info {
Signature · 1 line
2.7.4
PATCH 5/13 lustre: constify lib-move.c stuff
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- .../staging/lustre/include/linux/lnet/lib-lnet.h | 28 +++++++++++----------- drivers/staging/lustre/lnet/lnet/lib-move.c | 20 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/lustre/include/linux/lnet/lib-lnet.h +14 -14
@@ -605,34 +605,34 @@ void lnet_counters_reset(void);unsigned int lnet_iov_nob (unsigned int niov,struct kvec *iov);int lnet_extract_iov (int dst_niov,struct kvec *dst, -int src_niov,struct kvec *src, +int src_niov,const struct kvec *src,unsigned int offset,unsigned int len);unsigned int lnet_kiov_nob (unsigned int niov,lnet_kiov_t *iov);int lnet_extract_kiov (int dst_niov,lnet_kiov_t *dst, -int src_niov,lnet_kiov_t *src, +int src_niov,const lnet_kiov_t *src,unsigned int offset,unsigned int len); -void lnet_copy_iov2iov (unsigned int ndiov,struct kvec *diov, +void lnet_copy_iov2iov (unsigned int ndiov,const struct kvec *diov,unsigned int doffset, -unsigned int nsiov,struct kvec *siov, +unsigned int nsiov,const struct kvec *siov,unsigned int soffset,unsigned int nob); -void lnet_copy_kiov2iov (unsigned int niov,struct kvec *iov, +void lnet_copy_kiov2iov (unsigned int niov,const struct kvec *iov,unsigned int iovoffset, -unsigned int nkiov,lnet_kiov_t *kiov, +unsigned int nkiov,const lnet_kiov_t *kiov,unsigned int kiovoffset,unsigned int nob); -void lnet_copy_iov2kiov (unsigned int nkiov,lnet_kiov_t *kiov, +void lnet_copy_iov2kiov (unsigned int nkiov,const lnet_kiov_t *kiov,unsigned int kiovoffset, -unsigned int niov,struct kvec *iov, +unsigned int niov,const struct kvec *iov,unsigned int iovoffset,unsigned int nob); -void lnet_copy_kiov2kiov (unsigned int ndkiov,lnet_kiov_t *dkiov, +void lnet_copy_kiov2kiov (unsigned int ndkiov,const lnet_kiov_t *dkiov,unsigned int doffset, -unsigned int nskiov,lnet_kiov_t *skiov, +unsigned int nskiov,const lnet_kiov_t *skiov,unsigned int soffset,unsigned int nob);static inline void lnet_copy_iov2flat (int dlen,void *dest,unsigned int doffset, -unsigned int nsiov,struct kvec *siov,unsigned int soffset, +unsigned int nsiov,const struct kvec *siov,unsigned int soffset,unsigned int nob) {struct kvec diov = {/*.iov_base = */ dest,/*.iov_len = */ dlen};
@@ -643,7 +643,7 @@ lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,static inline void lnet_copy_kiov2flat (int dlen,void *dest,unsigned int doffset, -unsigned int nsiov,lnet_kiov_t *skiov, +unsigned int nsiov,const lnet_kiov_t *skiov,unsigned int soffset,unsigned int nob) {struct kvec diov = {/* .iov_base = */ dest,/* .iov_len = */ dlen};
@@ -653,7 +653,7 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, }static inline void -lnet_copy_flat2iov (unsigned int ndiov,struct kvec *diov,unsigned int doffset, +lnet_copy_flat2iov (unsigned int ndiov,const struct kvec *diov,unsigned int doffset,int slen,void *src,unsigned int soffset,unsigned int nob) {struct kvec siov = {/*.iov_base = */ src,/*.iov_len = */ slen};
@@ -663,7 +663,7 @@ lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset, }static inline void -lnet_copy_flat2kiov (unsigned int ndiov,lnet_kiov_t *dkiov, +lnet_copy_flat2kiov (unsigned int ndiov,const lnet_kiov_t *dkiov,unsigned int doffset,int slen,void *src,unsigned int soffset,unsigned int nob) {
drivers/staging/lustre/lnet/lnet/lib-move.c +10 -10
@@ -166,8 +166,8 @@ lnet_iov_nob(unsigned int niov, struct kvec *iov)EXPORT_SYMBOL (lnet_iov_nob);void -lnet_copy_iov2iov (unsigned int ndiov,struct kvec *diov,unsigned int doffset, -unsigned int nsiov,struct kvec *siov,unsigned int soffset, +lnet_copy_iov2iov (unsigned int ndiov,const struct kvec *diov,unsigned int doffset, +unsigned int nsiov,const struct kvec *siov,unsigned int soffset,unsigned int nob) {/* NB diov, siov are READ-ONLY */
@@ -226,7 +226,7 @@ EXPORT_SYMBOL(lnet_copy_iov2iov);int lnet_extract_iov (int dst_niov,struct kvec *dst, -int src_niov,struct kvec *src, +int src_niov,const struct kvec *src,unsigned int offset,unsigned int len) {/*
@@ -287,8 +287,8 @@ lnet_kiov_nob(unsigned int niov, lnet_kiov_t *kiov)EXPORT_SYMBOL (lnet_kiov_nob);void -lnet_copy_kiov2kiov (unsigned int ndiov,lnet_kiov_t *diov,unsigned int doffset, -unsigned int nsiov,lnet_kiov_t *siov,unsigned int soffset, +lnet_copy_kiov2kiov (unsigned int ndiov,const lnet_kiov_t *diov,unsigned int doffset, +unsigned int nsiov,const lnet_kiov_t *siov,unsigned int soffset,unsigned int nob) {/* NB diov, siov are READ-ONLY */
@@ -370,8 +370,8 @@ lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset,EXPORT_SYMBOL (lnet_copy_kiov2kiov);void -lnet_copy_kiov2iov (unsigned int niov,struct kvec *iov,unsigned int iovoffset, -unsigned int nkiov,lnet_kiov_t *kiov, +lnet_copy_kiov2iov (unsigned int niov,const struct kvec *iov,unsigned int iovoffset, +unsigned int nkiov,const lnet_kiov_t *kiov,unsigned int kiovoffset,unsigned int nob) {/* NB iov, kiov are READ-ONLY */
@@ -440,9 +440,9 @@ lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,EXPORT_SYMBOL (lnet_copy_kiov2iov);void -lnet_copy_iov2kiov (unsigned int nkiov,lnet_kiov_t *kiov, +lnet_copy_iov2kiov (unsigned int nkiov,const lnet_kiov_t *kiov,unsigned int kiovoffset,unsigned int niov, -struct kvec *iov,unsigned int iovoffset, +const struct kvec *iov,unsigned int iovoffset,unsigned int nob) {/* NB kiov, iov are READ-ONLY */
@@ -511,7 +511,7 @@ EXPORT_SYMBOL(lnet_copy_iov2kiov);int lnet_extract_kiov (int dst_niov,lnet_kiov_t *dst, -int src_niov,lnet_kiov_t *src, +int src_niov,const lnet_kiov_t *src,unsigned int offset,unsigned int len) {/*
Signature · 1 line
2.7.4
PATCH 6/13 lustre: pass iov_iter to ->lnd_recv()
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- .../staging/lustre/include/linux/lnet/lib-types.h | 5 +--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 3 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 32 ++++++++++++---------- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 4 +-- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 21 ++++++-------- drivers/staging/lustre/lnet/lnet/lib-move.c | 11 ++++++-- drivers/staging/lustre/lnet/lnet/lo.c | 24 ++++++++-------- 7 files changed, 49 insertions(+), 51 deletions(-)
drivers/staging/lustre/include/linux/lnet/lib-types.h +1 -4
@@ -220,10 +220,7 @@ typedef struct lnet_lnd {* credit if the LND does flow control. */ int (*lnd_recv)(struct lnet_ni *ni,void *private,lnet_msg_t *msg, -int delayed,unsigned int niov, -struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen, -unsigned int rlen); +int delayed,struct iov_iter *to,unsigned int rlen);/* * lnet_parse() has had to delay processing of this message
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +1 -2
@@ -1034,5 +1034,4 @@ int kiblnd_post_rx(struct kib_rx *rx, int credit);int kiblnd_send (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg);int kiblnd_recv (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg,int delayed, -unsigned int niov,struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen,unsigned int rlen); +struct iov_iter *to,unsigned int rlen);
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +17 -15
@@ -648,7 +648,7 @@ static int kiblnd_map_tx(lnet_ni_t *ni, struct kib_tx *tx, struct kib_rdma_descstatic int kiblnd_setup_rd_iov (lnet_ni_t *ni,struct kib_tx *tx,struct kib_rdma_desc *rd, -unsigned int niov,struct kvec *iov,int offset,int nob) +unsigned int niov,const struct kvec *iov,int offset,int nob) {struct kib_net *net = ni->ni_data;struct page *page;
@@ -705,7 +705,7 @@ kiblnd_setup_rd_iov(lnet_ni_t *ni, struct kib_tx *tx, struct kib_rdma_desc *rd,static int kiblnd_setup_rd_kiov (lnet_ni_t *ni,struct kib_tx *tx,struct kib_rdma_desc *rd, -int nkiov,lnet_kiov_t *kiov,int offset,int nob) +int nkiov,const lnet_kiov_t *kiov,int offset,int nob) {struct kib_net *net = ni->ni_data;struct scatterlist *sg;
@@ -1719,8 +1719,7 @@ kiblnd_reply(lnet_ni_t *ni, struct kib_rx *rx, lnet_msg_t *lntmsg)int kiblnd_recv (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg,int delayed, -unsigned int niov,struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen,unsigned int rlen) +struct iov_iter *to,unsigned int rlen) {struct kib_rx *rx = private;struct kib_msg *rxmsg = rx->rx_msg;
@@ -1730,10 +1729,9 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,int post_credit =IBLND_POSTRX_PEER_CREDIT ;int rc =0 ; -LASSERT (mlen <= rlen); +LASSERT (iov_iter_count (to) <= rlen);LASSERT (!in_interrupt ());/* Either all pages or all vaddrs */ -LASSERT (!(kiov && iov));switch (rxmsg->ibm_type) {default :
@@ -1749,16 +1747,16 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,break ; } -if (kiov) -lnet_copy_flat2kiov (niov, kiov, offset, +if (to->type &ITER_BVEC ) +lnet_copy_flat2kiov (to->nr_segs, to->bvec, to->iov_offset,IBLND_MSG_SIZE , rxmsg, offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - mlen); + iov_iter_count(to));else -lnet_copy_flat2iov (niov, iov, offset, +lnet_copy_flat2iov (to->nr_segs, to->kvec, to->iov_offset,IBLND_MSG_SIZE , rxmsg, offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - mlen); + iov_iter_count(to));lnet_finalize (ni, lntmsg,0 );break ;
@@ -1766,7 +1764,7 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,struct kib_msg *txmsg;struct kib_rdma_desc *rd; -if (!mlen) { +if (!iov_iter_count (to)) {lnet_finalize (ni, lntmsg,0 );kiblnd_send_completion (rx->rx_conn,IBLND_MSG_PUT_NAK ,0 , rxmsg->ibm_u.putreq.ibprm_cookie);
@@ -1784,12 +1782,16 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, txmsg = tx->tx_msg; rd = &txmsg->ibm_u.putack.ibpam_rd; -if (!kiov) +if (!(to->type &ITER_BVEC )) rc =kiblnd_setup_rd_iov (ni, tx, rd, - niov, iov, offset, mlen); + to->nr_segs, to->kvec, + to->iov_offset, +iov_iter_count (to));else rc =kiblnd_setup_rd_kiov (ni, tx, rd, - niov, kiov, offset, mlen); + to->nr_segs, to->bvec, + to->iov_offset, +iov_iter_count (to));if (rc) {CERROR ("Can't setup PUT sink for %s: %d\n" ,libcfs_nid2str (conn->ibc_peer->ibp_nid), rc);
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +1 -3
@@ -614,9 +614,7 @@ void ksocknal_shutdown(lnet_ni_t *ni);int ksocknal_ctl (lnet_ni_t *ni,unsigned int cmd,void *arg);int ksocknal_send (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg);int ksocknal_recv (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg, -int delayed,unsigned int niov, -struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen,unsigned int rlen); +int delayed,struct iov_iter *to,unsigned int rlen);int ksocknal_accept (lnet_ni_t *ni,struct socket *sock);int ksocknal_add_peer (lnet_ni_t *ni,lnet_process_id_t id,__u32 ip,int port);
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +9 -12
@@ -1325,39 +1325,36 @@ ksocknal_process_receive(struct ksock_conn *conn)int ksocknal_recv (lnet_ni_t *ni,void *private,lnet_msg_t *msg,int delayed, -unsigned int niov,struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen,unsigned int rlen) +struct iov_iter *to,unsigned int rlen) {struct ksock_conn *conn = private;struct ksock_sched *sched = conn->ksnc_scheduler; -LASSERT (mlen <= rlen); -LASSERT (niov <=LNET_MAX_IOV ); +LASSERT (iov_iter_count (to) <= rlen); +LASSERT (to->nr_segs <=LNET_MAX_IOV ); conn->ksnc_cookie = msg; - conn->ksnc_rx_nob_wanted = mlen; + conn->ksnc_rx_nob_wanted =iov_iter_count (to); conn->ksnc_rx_nob_left = rlen; -if (!mlen || iov) { +if (to->type &ITER_KVEC ) { conn->ksnc_rx_nkiov =0 ; conn->ksnc_rx_kiov =NULL ; conn->ksnc_rx_iov = conn->ksnc_rx_iov_space.iov; conn->ksnc_rx_niov =lnet_extract_iov (LNET_MAX_IOV , conn->ksnc_rx_iov, - niov, iov, offset, mlen); + to->nr_segs, to->kvec, + to->iov_offset,iov_iter_count (to)); }else { conn->ksnc_rx_niov =0 ; conn->ksnc_rx_iov =NULL ; conn->ksnc_rx_kiov = conn->ksnc_rx_iov_space.kiov; conn->ksnc_rx_nkiov =lnet_extract_kiov (LNET_MAX_IOV , conn->ksnc_rx_kiov, - niov, kiov, offset, mlen); + to->nr_segs, to->bvec, + to->iov_offset,iov_iter_count (to)); } -LASSERT (mlen == -lnet_iov_nob (conn->ksnc_rx_niov, conn->ksnc_rx_iov) + -lnet_kiov_nob (conn->ksnc_rx_nkiov, conn->ksnc_rx_kiov)); -LASSERT (conn->ksnc_rx_scheduled);spin_lock_bh (&sched->kss_lock);
drivers/staging/lustre/lnet/lnet/lib-move.c +9 -2
@@ -569,6 +569,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,unsigned int niov =0 ;struct kvec *iov =NULL ;lnet_kiov_t *kiov =NULL ; +struct iov_iter to;int rc;LASSERT (!in_interrupt ());
@@ -594,8 +595,14 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, } } - rc = ni->ni_lnd->lnd_recv (ni, private, msg, delayed, - niov, iov, kiov, offset, mlen, rlen); +if (iov) { +iov_iter_kvec (&to,ITER_KVEC |READ , iov, niov, mlen + offset); +iov_iter_advance (&to, offset); + }else { +iov_iter_bvec (&to,ITER_BVEC |READ , kiov, niov, mlen + offset); +iov_iter_advance (&to, offset); + } + rc = ni->ni_lnd->lnd_recv (ni, private, msg, delayed, &to, rlen);if (rc <0 )lnet_finalize (ni, msg, rc); }
drivers/staging/lustre/lnet/lnet/lo.c +11 -13
@@ -42,35 +42,33 @@ lolnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)static int lolnd_recv (lnet_ni_t *ni,void *private,lnet_msg_t *lntmsg, -int delayed,unsigned int niov, -struct kvec *iov,lnet_kiov_t *kiov, -unsigned int offset,unsigned int mlen,unsigned int rlen) +int delayed,struct iov_iter *to,unsigned int rlen) {lnet_msg_t *sendmsg = private;if (lntmsg) {/* not discarding */ if (sendmsg->msg_iov) { -if (iov) -lnet_copy_iov2iov (niov, iov, offset, +if (to->type &ITER_KVEC ) +lnet_copy_iov2iov (to->nr_segs, to->kvec, to->iov_offset, sendmsg->msg_niov, sendmsg->msg_iov, - sendmsg->msg_offset, mlen); + sendmsg->msg_offset,iov_iter_count (to));else -lnet_copy_iov2kiov (niov, kiov, offset, +lnet_copy_iov2kiov (to->nr_segs, to->bvec, to->iov_offset, sendmsg->msg_niov, sendmsg->msg_iov, - sendmsg->msg_offset, mlen); + sendmsg->msg_offset,iov_iter_count (to)); }else { -if (iov) -lnet_copy_kiov2iov (niov, iov, offset, +if (to->type &ITER_KVEC ) +lnet_copy_kiov2iov (to->nr_segs, to->kvec, to->iov_offset, sendmsg->msg_niov, sendmsg->msg_kiov, - sendmsg->msg_offset, mlen); + sendmsg->msg_offset,iov_iter_count (to));else -lnet_copy_kiov2kiov (niov, kiov, offset, +lnet_copy_kiov2kiov (to->nr_segs, to->bvec, to->iov_offset, sendmsg->msg_niov, sendmsg->msg_kiov, - sendmsg->msg_offset, mlen); + sendmsg->msg_offset,iov_iter_count (to)); }lnet_finalize (ni, lntmsg,0 );
Signature · 1 line
2.7.4
PATCH 7/13 lustre: introduce lnet_copy_{k,}iov2iter(), kill lnet_copy_{k,}iov2{k,}iov()
In reply to Oleg DrokinFrom: Al Viro <[email protected]>
--- .../staging/lustre/include/linux/lnet/lib-lnet.h | 57 +--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 37 ++- drivers/staging/lustre/lnet/lnet/lib-move.c | 314 ++++----------------- drivers/staging/lustre/lnet/lnet/lo.c | 35 +-- 4 files changed, 86 insertions(+), 357 deletions(-)
drivers/staging/lustre/include/linux/lnet/lib-lnet.h +2 -55
@@ -613,65 +613,12 @@ int lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst, int src_niov, const lnet_kiov_t *src, unsigned int offset, unsigned int len); -void lnet_copy_iov2iov (unsigned int ndiov,const struct kvec *diov, -unsigned int doffset, +void lnet_copy_iov2iter (struct iov_iter *to,unsigned int nsiov,const struct kvec *siov,unsigned int soffset,unsigned int nob); -void lnet_copy_kiov2iov (unsigned int niov,const struct kvec *iov, -unsigned int iovoffset, +void lnet_copy_kiov2iter (struct iov_iter *to,unsigned int nkiov,const lnet_kiov_t *kiov,unsigned int kiovoffset,unsigned int nob); -void lnet_copy_iov2kiov (unsigned int nkiov,const lnet_kiov_t *kiov, -unsigned int kiovoffset, -unsigned int niov,const struct kvec *iov, -unsigned int iovoffset,unsigned int nob); -void lnet_copy_kiov2kiov (unsigned int ndkiov,const lnet_kiov_t *dkiov, -unsigned int doffset, -unsigned int nskiov,const lnet_kiov_t *skiov, -unsigned int soffset,unsigned int nob); - -static inline void -lnet_copy_iov2flat (int dlen,void *dest,unsigned int doffset, -unsigned int nsiov,const struct kvec *siov,unsigned int soffset, -unsigned int nob) -{ -struct kvec diov = {/*.iov_base = */ dest,/*.iov_len = */ dlen}; - -lnet_copy_iov2iov (1 , &diov, doffset, - nsiov, siov, soffset, nob); -} - -static inline void -lnet_copy_kiov2flat (int dlen,void *dest,unsigned int doffset, -unsigned int nsiov,const lnet_kiov_t *skiov, -unsigned int soffset,unsigned int nob) -{ -struct kvec diov = {/* .iov_base = */ dest,/* .iov_len = */ dlen}; - -lnet_copy_kiov2iov (1 , &diov, doffset, - nsiov, skiov, soffset, nob); -} - -static inline void -lnet_copy_flat2iov (unsigned int ndiov,const struct kvec *diov,unsigned int doffset, -int slen,void *src,unsigned int soffset,unsigned int nob) -{ -struct kvec siov = {/*.iov_base = */ src,/*.iov_len = */ slen}; - -lnet_copy_iov2iov (ndiov, diov, doffset, -1 , &siov, soffset, nob); -} - -static inline void -lnet_copy_flat2kiov (unsigned int ndiov,const lnet_kiov_t *dkiov, -unsigned int doffset,int slen,void *src, -unsigned int soffset,unsigned int nob) -{ -struct kvec siov = {/* .iov_base = */ src,/* .iov_len = */ slen}; - -lnet_copy_iov2kiov (ndiov, dkiov, doffset, -1 , &siov, soffset, nob); -}void lnet_me_unlink (lnet_me_t *me);
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +16 -21
@@ -1499,6 +1499,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)lnet_kiov_t *payload_kiov = lntmsg->msg_kiov;unsigned int payload_offset = lntmsg->msg_offset;unsigned int payload_nob = lntmsg->msg_len; +struct iov_iter from;struct kib_msg *ibmsg;struct kib_rdma_desc *rd;struct kib_tx *tx;
@@ -1518,6 +1519,17 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)/* payload is either all vaddrs or all pages */ LASSERT (!(payload_kiov && payload_iov)); +if (payload_kiov) +iov_iter_bvec (&from,ITER_BVEC |WRITE , + payload_kiov, payload_niov, + payload_nob + payload_offset); +else +iov_iter_kvec (&from,ITER_KVEC |WRITE , + payload_iov, payload_niov, + payload_nob + payload_offset); + +iov_iter_advance (&from, payload_offset); +switch (type) {default :LBUG ();
@@ -1637,17 +1649,8 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) ibmsg = tx->tx_msg; ibmsg->ibm_u.immediate.ibim_hdr = *hdr; -if (payload_kiov) -lnet_copy_kiov2flat (IBLND_MSG_SIZE , ibmsg, - offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - payload_niov, payload_kiov, - payload_offset, payload_nob); -else -lnet_copy_iov2flat (IBLND_MSG_SIZE , ibmsg, - offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - payload_niov, payload_iov, - payload_offset, payload_nob); - +copy_from_iter (&ibmsg->ibm_u.immediate.ibim_payload,IBLND_MSG_SIZE , + &from); nob = offsetof(struct kib_immediate_msg, ibim_payload[payload_nob]);kiblnd_init_tx_msg (ni, tx,IBLND_MSG_IMMEDIATE , nob);
@@ -1747,16 +1750,8 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,break ; } -if (to->type &ITER_BVEC ) -lnet_copy_flat2kiov (to->nr_segs, to->bvec, to->iov_offset, -IBLND_MSG_SIZE , rxmsg, - offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - iov_iter_count(to)); -else -lnet_copy_flat2iov (to->nr_segs, to->kvec, to->iov_offset, -IBLND_MSG_SIZE , rxmsg, - offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), - iov_iter_count(to)); +copy_to_iter (&rxmsg->ibm_u.immediate.ibim_payload, +IBLND_MSG_SIZE , to);lnet_finalize (ni, lntmsg,0 );break ;
drivers/staging/lustre/lnet/lnet/lib-move.c +56 -258
345 lines not on this page · raw message
drivers/staging/lustre/lnet/lnet/lo.c +12 -23
@@ -47,29 +47,18 @@ lolnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg,lnet_msg_t *sendmsg = private;if (lntmsg) {/* not discarding */ -if (sendmsg->msg_iov) { -if (to->type &ITER_KVEC ) -lnet_copy_iov2iov (to->nr_segs, to->kvec, to->iov_offset, - sendmsg->msg_niov, - sendmsg->msg_iov, - sendmsg->msg_offset,iov_iter_count (to)); -else -lnet_copy_iov2kiov (to->nr_segs, to->bvec, to->iov_offset, - sendmsg->msg_niov, - sendmsg->msg_iov, - sendmsg->msg_offset,iov_iter_count (to)); - }else { -if (to->type &ITER_KVEC ) -lnet_copy_kiov2iov (to->nr_segs, to->kvec, to->iov_offset, - sendmsg->msg_niov, - sendmsg->msg_kiov, - sendmsg->msg_offset,iov_iter_count (to)); -else -lnet_copy_kiov2kiov (to->nr_segs, to->bvec, to->iov_offset, - sendmsg->msg_niov, - sendmsg->msg_kiov, - sendmsg->msg_offset,iov_iter_count (to)); - } +if (sendmsg->msg_iov) +lnet_copy_iov2iter (to, + sendmsg->msg_niov, + sendmsg->msg_iov, + sendmsg->msg_offset, +iov_iter_count (to)); +else +lnet_copy_kiov2iter (to, + sendmsg->msg_niov, + sendmsg->msg_kiov, + sendmsg->msg_offset, +iov_iter_count (to));lnet_finalize (ni, lntmsg,0 ); }
Signature · 1 line
2.7.4
PATCH 8/13 staging/lustre: Always return EEXIST on mkdir for existing names
In reply to Oleg Drokinif the name already exists, but we don't have write permissions in the parent, force talking to the MDS to determine what more sensical error code to return.
This also happens to fix matlab and other such programs that assume that EEXIST is the only valid error code for mkdir of an existing directory.
--- drivers/staging/lustre/lustre/llite/namei.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/llite/namei.c +6 -2
@@ -541,8 +541,12 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,CDEBUG (D_VFSTRACE ,"VFS Op:name=%pd, dir=" DFID "(%p),flags=%u\n" , dentry,PFID (ll_inode2fid (parent)), parent, flags); -/* Optimize away (CREATE && !OPEN). Let .create handle the race. */ -if ((flags &LOOKUP_CREATE ) && !(flags &LOOKUP_OPEN )) +/* Optimize away (CREATE && !OPEN). Let .create handle the race. +* but only if we have write permissions there, otherwise we need +* to proceed with lookup. LU-4185 +*/ +if ((flags &LOOKUP_CREATE ) && !(flags &LOOKUP_OPEN ) && + (inode_permission (parent,MAY_WRITE |MAY_EXEC ) ==0 ))return NULL ;if (flags & (LOOKUP_PARENT |LOOKUP_OPEN |LOOKUP_CREATE ))
Signature · 1 line
2.7.4
PATCH 9/13 staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}'
In reply to Oleg DrokinFrom: Emoly Liu <[email protected]>
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code.
--- drivers/staging/lustre/lustre/include/lu_object.h | 3 +- .../lustre/lustre/include/lustre/lustre_idl.h | 42 +++++++++++----------- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 13 +++---- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 +-- drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 4 +-- drivers/staging/lustre/lustre/llite/llite_lib.c | 21 ++++++----- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 ++++---- drivers/staging/lustre/lustre/llite/namei.c | 4 +-- drivers/staging/lustre/lustre/llite/rw.c | 5 +-- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 4 +-- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 14 ++++---- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 +-- drivers/staging/lustre/lustre/obdclass/debug.c | 4 +-- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 12 +++---- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 ++-- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 ++-- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 +-- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 ++++--- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 ++-- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +-- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 37 files changed, 121 insertions(+), 105 deletions(-)
drivers/staging/lustre/lustre/include/lu_object.h +2 -1
@@ -1025,7 +1025,8 @@ enum lu_context_tag {/** * Contexts usable in cache shrinker thread. */ - LCT_SHRINKER = LCT_MD_THREAD|LCT_DT_THREAD|LCT_CL_THREAD|LCT_NOREF +LCT_SHRINKER =LCT_MD_THREAD |LCT_DT_THREAD |LCT_CL_THREAD | + LCT_NOREF };/**
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +21 -21
66 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +1 -1
@@ -736,7 +736,7 @@ static inline void hsm_set_cl_error(int *flags, int error) *flags |= (error <<CLF_HSM_ERR_L ); } -#define CR_MAXSIZE cfs_size_round(2*NAME_MAX + 1 + \ +#define CR_MAXSIZE cfs_size_round(2 * NAME_MAX + 1 + \ sizeof(struct changelog_ext_rec))struct changelog_rec {
drivers/staging/lustre/lustre/include/lustre_fid.h +1 -1
@@ -603,7 +603,7 @@ static inline __u32 fid_flatten32(const struct lu_fid *fid)* (from OID), or up to 128M inodes without collisions for new files. */ ino = ((seq &0x000fffffULL ) <<12 ) + ((seq >>8 ) &0xfffff000 ) + - (seq >> (64 - (40 -8 )) &0xffffff00 ) + + (seq >> (64 - (40 -8 )) &0xffffff00 ) + (fid_oid (fid) &0xff000fff ) + ((fid_oid (fid) &0x00fff000 ) <<8 );return ino ? ino :fid_oid (fid);
drivers/staging/lustre/lustre/include/lustre_lite.h +1 -1
@@ -47,7 +47,7 @@/* 4UL * 1024 * 1024 */ #define LL_MAX_BLKSIZE_BITS (22) -#define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS) +#define LL_MAX_BLKSIZE (1UL << LL_MAX_BLKSIZE_BITS)/* * This is embedded into llite super-blocks to keep track of
drivers/staging/lustre/lustre/include/obd_support.h +7 -6
@@ -117,17 +117,17 @@ extern char obd_jobid_var[];* running on a backup server. (If it's too low, import_select_connection * will increase the timeout anyhow.) */ -#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN, obd_timeout/20) +#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN, obd_timeout / 20)/* The max delay between connects is SWITCH_MAX + SWITCH_INC + INITIAL */ #define RECONNECT_DELAY_MAX (CONNECTION_SWITCH_MAX + CONNECTION_SWITCH_INC + \ INITIAL_CONNECT_TIMEOUT)/* The min time a target should wait for clients to reconnect in recovery */ -#define OBD_RECOVERY_TIME_MIN (2*RECONNECT_DELAY_MAX) +#define OBD_RECOVERY_TIME_MIN (2 * RECONNECT_DELAY_MAX)#define OBD_IR_FACTOR_MIN 1#define OBD_IR_FACTOR_MAX 10 -#define OBD_IR_FACTOR_DEFAULT (OBD_IR_FACTOR_MAX/2) +#define OBD_IR_FACTOR_DEFAULT (OBD_IR_FACTOR_MAX / 2)/* default timeout for the MGS to become IR_FULL */ -#define OBD_IR_MGS_TIMEOUT (4*obd_timeout) +#define OBD_IR_MGS_TIMEOUT (4 * obd_timeout)#define LONG_UNLINK 300/* Unlink should happen before now */ /**
@@ -520,7 +520,8 @@ do { \POISON_PTR (ptr); \ } while (0) -#define KEY_IS (str) \ - (keylen >= (sizeof(str)-1) && memcmp(key, str, (sizeof(str)-1)) == 0) +#define KEY_IS (str) \ + (keylen >= (sizeof(str) - 1) && \ + memcmp(key, str, (sizeof(str) - 1)) == 0)#endif
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +2 -2
@@ -463,8 +463,8 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)* holding the lock even if app still believes it has it, since * server already dropped it anyway. Only for granted locks too. */ -if ((lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_LOCAL_ONLY )) == - (LDLM_FL_FAILED |LDLM_FL_LOCAL_ONLY )) { +if ((lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_LOCAL_ONLY )) == + (LDLM_FL_FAILED |LDLM_FL_LOCAL_ONLY )) {if (lock->l_req_mode == lock->l_granted_mode && lock->l_granted_mode !=LCK_NL && !data)ldlm_lock_decref_internal (lock, lock->l_req_mode);
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +2 -2
@@ -819,7 +819,7 @@ static __u64 ldlm_cli_cancel_local(struct ldlm_lock *lock)lock_res_and_lock (lock);ldlm_set_cbpending (lock); local_only = !!(lock->l_flags & - (LDLM_FL_LOCAL_ONLY |LDLM_FL_CANCEL_ON_BLOCK )); + (LDLM_FL_LOCAL_ONLY |LDLM_FL_CANCEL_ON_BLOCK ));ldlm_cancel_callback (lock); rc =ldlm_is_bl_ast (lock) ?LDLM_FL_BL_AST :LDLM_FL_CANCELING ;unlock_res_and_lock (lock);
@@ -1843,7 +1843,7 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure)* bug 17614: locks being actively cancelled. Get a reference * on a lock so that it does not disappear under us (e.g. due to cancel) */ -if (!(lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_CANCELING ))) { +if (!(lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_CANCELING ))) {list_add (&lock->l_pending_chain, list);LDLM_LOCK_GET (lock); }
drivers/staging/lustre/lustre/llite/dir.c +1 -1
@@ -191,7 +191,7 @@ static int ll_dir_filler(void *_hash, struct page *page0)if (body->valid &OBD_MD_FLSIZE )i_size_write (inode, body->size); - nrdpgs = (request->rq_bulk->bd_nob_transferred+PAGE_SIZE -1 ) + nrdpgs = (request->rq_bulk->bd_nob_transferred +PAGE_SIZE -1 ) >>PAGE_SHIFT ;SetPageUptodate (page0); }
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -2474,7 +2474,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (och) { mode = och->och_flags & - (FMODE_READ |FMODE_WRITE ); + (FMODE_READ |FMODE_WRITE ); rc =ll_lease_close (och, inode, &lease_broken);if (rc ==0 && lease_broken) mode =0 ;
@@ -2847,7 +2847,7 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits,struct lustre_handle lockh;ldlm_policy_data_t policy;enum ldlm_mode mode = (l_req_mode ==LCK_MINMODE ) ? - (LCK_CR |LCK_CW |LCK_PR |LCK_PW ) : l_req_mode; + (LCK_CR |LCK_CW |LCK_PR |LCK_PW ) : l_req_mode;struct lu_fid *fid;__u64 flags;int i;
drivers/staging/lustre/lustre/llite/llite_lib.c +12 -9
@@ -648,7 +648,8 @@ static int ll_options(char *options, int *flags) *flags |= tmp; goto next; } - tmp =ll_set_opt ("noflock" , s1,LL_SBI_FLOCK |LL_SBI_LOCALFLOCK ); + tmp =ll_set_opt ("noflock" , s1, +LL_SBI_FLOCK |LL_SBI_LOCALFLOCK );if (tmp) { *flags &= ~tmp; goto next;
@@ -1332,14 +1333,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr) {int mode =d_inode (de)->i_mode; -if ((attr->ia_valid & (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) == - (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) +if ((attr->ia_valid & (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) == + (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) attr->ia_valid |=MDS_OPEN_OWNEROVERRIDE ; -if (((attr->ia_valid & (ATTR_MODE |ATTR_FORCE |ATTR_SIZE )) == - (ATTR_SIZE |ATTR_MODE )) && +if (((attr->ia_valid & (ATTR_MODE |ATTR_FORCE |ATTR_SIZE )) == + (ATTR_SIZE |ATTR_MODE )) && (((mode &S_ISUID ) && !(attr->ia_mode &S_ISUID )) || - (((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && + (((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && !(attr->ia_mode &S_ISGID )))) attr->ia_valid |=ATTR_FORCE ;
@@ -1350,7 +1351,7 @@ int ll_setattr(struct dentry *de, struct iattr *attr) attr->ia_valid |=ATTR_KILL_SUID ;if ((attr->ia_valid &ATTR_MODE ) && - ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && + ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && !(attr->ia_mode &S_ISGID ) && !(attr->ia_valid &ATTR_KILL_SGID )) attr->ia_valid |=ATTR_KILL_SGID ;
@@ -1517,9 +1518,11 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) lli->lli_ctime = body->ctime; }if (body->valid &OBD_MD_FLMODE ) - inode->i_mode = (inode->i_mode &S_IFMT )|(body->mode & ~S_IFMT ); + inode->i_mode = (inode->i_mode &S_IFMT ) | + (body->mode & ~S_IFMT );if (body->valid &OBD_MD_FLTYPE ) - inode->i_mode = (inode->i_mode & ~S_IFMT )|(body->mode &S_IFMT ); + inode->i_mode = (inode->i_mode & ~S_IFMT ) | + (body->mode &S_IFMT );LASSERT (inode->i_mode !=0 );if (S_ISREG (inode->i_mode)) inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS + 1,
drivers/staging/lustre/lustre/llite/llite_mmap.c +2 -2
@@ -126,7 +126,7 @@ restart: fio = &io->u.ci_fault; fio->ft_index = index; - fio->ft_executable = vma->vm_flags&VM_EXEC ; + fio->ft_executable = vma->vm_flags &VM_EXEC ;/* * disable VM_SEQ_READ and use VM_RAND_READ to make sure that
@@ -134,7 +134,7 @@ restart:* filemap_nopage. we do our readahead in ll_readpage. */ if (ra_flags) - *ra_flags = vma->vm_flags & (VM_RAND_READ |VM_SEQ_READ ); + *ra_flags = vma->vm_flags & (VM_RAND_READ |VM_SEQ_READ ); vma->vm_flags &= ~VM_SEQ_READ ; vma->vm_flags |=VM_RAND_READ ;
drivers/staging/lustre/lustre/llite/lproc_llite.c +7 -7
@@ -893,17 +893,17 @@ static const struct llite_file_opcode {/* file operation */ { LPROC_LL_DIRTY_HITS, LPROCFS_TYPE_REGS, "dirty_pages_hits" }, { LPROC_LL_DIRTY_MISSES, LPROCFS_TYPE_REGS, "dirty_pages_misses" }, - { LPROC_LL_READ_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_READ_BYTES, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "read_bytes" }, - { LPROC_LL_WRITE_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_WRITE_BYTES, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "write_bytes" }, - { LPROC_LL_BRW_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, + { LPROC_LL_BRW_READ, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_PAGES, "brw_read" }, - { LPROC_LL_BRW_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, + { LPROC_LL_BRW_WRITE, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_PAGES, "brw_write" }, - { LPROC_LL_OSC_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_OSC_READ, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "osc_read" }, - { LPROC_LL_OSC_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_OSC_WRITE, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "osc_write" }, { LPROC_LL_IOCTL, LPROCFS_TYPE_REGS, "ioctl" }, { LPROC_LL_OPEN, LPROCFS_TYPE_REGS, "open" },
@@ -1150,7 +1150,7 @@ static void ll_display_extents_info(struct ll_rw_extents_info *io_extents, r,pct (r, read_tot),pct (read_cum, read_tot), w, pct(w, write_tot), pct(write_cum, write_tot)); start = end; -if (start ==1 <<10 ) { +if (start ==1 <<10 ) { start =1 ; units +=10 ; unitp++;
drivers/staging/lustre/lustre/llite/namei.c +2 -2
@@ -549,7 +549,7 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, (inode_permission(parent, MAY_WRITE | MAY_EXEC) == 0))return NULL ; -if (flags & (LOOKUP_PARENT |LOOKUP_OPEN |LOOKUP_CREATE )) +if (flags & (LOOKUP_PARENT |LOOKUP_OPEN |LOOKUP_CREATE )) itp =NULL ;else itp = ⁢
@@ -965,7 +965,7 @@ static int ll_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)if (!IS_POSIXACL (dir) || !exp_connect_umask (ll_i2mdexp (dir))) mode &= ~current_umask (); - mode = (mode & (S_IRWXUGO |S_ISVTX )) |S_IFDIR ; + mode = (mode & (S_IRWXUGO |S_ISVTX )) |S_IFDIR ; err =ll_new_node (dir, dentry,NULL , mode,0 ,LUSTRE_OPC_MKDIR );if (!err)
drivers/staging/lustre/lustre/llite/rw.c +3 -2
@@ -651,7 +651,8 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,if (!stride_io_mode (ras) && (stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 )) { ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; + ras->ras_stride_length = ras->ras_consecutive_pages + + stride_gap; }LASSERT (ras->ras_request_index ==0 );LASSERT (ras->ras_consecutive_stride_requests ==0 );
@@ -663,7 +664,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, } ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras);return ;
drivers/staging/lustre/lustre/llite/rw26.c +1 -1
@@ -161,7 +161,7 @@ static int ll_releasepage(struct page *vmpage, gfp_t gfp_mask)return result; } -#define MAX_DIRECTIO_SIZE (2*1024*1024*1024UL) +#define MAX_DIRECTIO_SIZE (2 * 1024 * 1024 * 1024UL) static inline int ll_get_user_pages(int rw, unsigned long user_addr, size_t size, struct page ***pages,
drivers/staging/lustre/lustre/llite/super25.c +2 -2
@@ -102,8 +102,8 @@ static int __init lustre_init(void) rc = -ENOMEM ; ll_inode_cachep =kmem_cache_create ("lustre_inode_cache" , -sizeof (struct ll_inode_info ), -0 ,SLAB_HWCACHE_ALIGN |SLAB_ACCOUNT , +sizeof (struct ll_inode_info ),0 , +SLAB_HWCACHE_ALIGN |SLAB_ACCOUNT ,NULL );if (!ll_inode_cachep) goto out_cache;
drivers/staging/lustre/lustre/llite/vvp_object.c +1 -1
@@ -120,7 +120,7 @@ static int vvp_attr_set(const struct lu_env *env, struct cl_object *obj,if (0 && valid &CAT_SIZE )i_size_write (inode, attr->cat_size);/* not currently necessary */ -if (0 && valid & (CAT_UID |CAT_GID |CAT_SIZE )) +if (0 && valid & (CAT_UID |CAT_GID |CAT_SIZE ))mark_inode_dirty (inode);return 0 ; }
drivers/staging/lustre/lustre/lov/lov_ea.c +2 -1
@@ -66,7 +66,8 @@ static int lsm_lmm_verify_common(struct lov_mds_md *lmm, int lmm_bytes, }if (lmm->lmm_stripe_size ==0 || - (le32_to_cpu (lmm->lmm_stripe_size)&(LOV_MIN_STRIPE_SIZE -1 )) !=0 ) { + (le32_to_cpu (lmm->lmm_stripe_size) & + (LOV_MIN_STRIPE_SIZE -1 )) !=0 ) {CERROR ("bad stripe size %u\n" ,le32_to_cpu (lmm->lmm_stripe_size));lov_dump_lmm_common (D_WARNING , lmm);
drivers/staging/lustre/lustre/lov/lov_obd.c +8 -6
@@ -1916,8 +1916,9 @@ inactive_tgt:break ; } - len_mapped_single_call = lcl_fm_ext[ext_count-1 ].fe_logical - - lun_start + lcl_fm_ext[ext_count -1 ].fe_length; + len_mapped_single_call = + lcl_fm_ext[ext_count -1 ].fe_logical - + lun_start + lcl_fm_ext[ext_count -1 ].fe_length;/* Have we finished mapping on this device? */ if (req_fm_len <= len_mapped_single_call)
@@ -1926,14 +1927,15 @@ inactive_tgt:/* Clear the EXTENT_LAST flag which can be present on * last extent */ -if (lcl_fm_ext[ext_count-1 ].fe_flags &FIEMAP_EXTENT_LAST ) +if (lcl_fm_ext[ext_count -1 ].fe_flags & +FIEMAP_EXTENT_LAST ) lcl_fm_ext[ext_count -1 ].fe_flags &= ~FIEMAP_EXTENT_LAST ; curr_loc =lov_stripe_size (lsm, - lcl_fm_ext[ext_count -1 ].fe_logical+ - lcl_fm_ext[ext_count -1 ].fe_length, - cur_stripe); + lcl_fm_ext[ext_count -1 ].fe_logical + + lcl_fm_ext[ext_count -1 ].fe_length, + cur_stripe);if (curr_loc >= fm_key->oa.o_size) ost_eof =1 ;
drivers/staging/lustre/lustre/lov/lov_pool.c +1 -1
@@ -92,7 +92,7 @@ static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, unsigned mfor (i =0 ; i <LOV_MAXPOOLNAME ; i++) {if (poolname[i] =='\0' )break ; - result = (result <<4 )^(result >>28 ) ^ poolname[i]; + result = (result <<4 ) ^ (result >>28 ) ^ poolname[i]; }return (result % mask); }
drivers/staging/lustre/lustre/mdc/mdc_locks.c +1 -1
@@ -274,7 +274,7 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,else mode =LCK_PR ; }else { -if (it->it_flags & (FMODE_WRITE |MDS_OPEN_TRUNC )) +if (it->it_flags & (FMODE_WRITE |MDS_OPEN_TRUNC )) mode =LCK_CW ;else if (it->it_flags & __FMODE_EXEC) mode =LCK_PR ;
drivers/staging/lustre/lustre/mdc/mdc_reint.c +3 -2
@@ -110,7 +110,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,__u64 bits; bits =MDS_INODELOCK_UPDATE ; -if (op_data->op_attr.ia_valid & (ATTR_MODE |ATTR_UID |ATTR_GID )) +if (op_data->op_attr.ia_valid & (ATTR_MODE |ATTR_UID |ATTR_GID )) bits |=MDS_INODELOCK_LOOKUP ; if ((op_data->op_flags & MF_MDC_CANCEL_FID1) && (fid_is_sane(&op_data->op_fid1)) &&
@@ -431,7 +431,8 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, }req_capsule_set_size (&req->rq_pill, &RMF_NAME ,RCL_CLIENT , oldlen +1 ); -req_capsule_set_size (&req->rq_pill, &RMF_SYMTGT ,RCL_CLIENT , newlen+1 ); +req_capsule_set_size (&req->rq_pill, &RMF_SYMTGT ,RCL_CLIENT , + newlen +1 ); rc =mdc_prep_elc_req (exp, req,MDS_REINT , &cancels, count);if (rc) {
drivers/staging/lustre/lustre/obdclass/debug.c +2 -2
@@ -48,10 +48,10 @@ int block_debug_setup(void *addr, int len, __u64 off, __u64 id)LASSERT (addr);put_unaligned_le64 (off, addr); -put_unaligned_le64 (id, addr+LPDS ); +put_unaligned_le64 (id, addr +LPDS ); addr += len -LPDS -LPDS ;put_unaligned_le64 (off, addr); -put_unaligned_le64 (id, addr+LPDS ); +put_unaligned_le64 (id, addr +LPDS );return 0 ; }
drivers/staging/lustre/lustre/obdclass/genops.c +1 -1
@@ -509,7 +509,7 @@ struct obd_device *class_devices_in_group(struct obd_uuid *grp_uuid, int *next)continue ;if (obd_uuid_equals (grp_uuid, &obd->obd_uuid)) {if (next) - *next = i+1 ; + *next = i +1 ;read_unlock (&obd_dev_lock);return obd; }
drivers/staging/lustre/lustre/obdclass/obd_config.c +6 -6
@@ -1317,33 +1317,33 @@ static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,if (rc <0 )return rc; - ptr +=snprintf (ptr, end-ptr,"cmd=%05x " , lcfg->lcfg_command); + ptr +=snprintf (ptr, end - ptr,"cmd=%05x " , lcfg->lcfg_command);if (lcfg->lcfg_flags) - ptr +=snprintf (ptr, end-ptr,"flags=%#08x " , + ptr +=snprintf (ptr, end - ptr,"flags=%#08x " , lcfg->lcfg_flags);if (lcfg->lcfg_num) - ptr +=snprintf (ptr, end-ptr,"num=%#08x " , lcfg->lcfg_num); + ptr +=snprintf (ptr, end - ptr,"num=%#08x " , lcfg->lcfg_num);if (lcfg->lcfg_nid) {char nidstr[LNET_NIDSTR_SIZE ];libcfs_nid2str_r (lcfg->lcfg_nid, nidstr,sizeof (nidstr)); - ptr +=snprintf (ptr, end-ptr,"nid=%s(%#llx)\n " , + ptr +=snprintf (ptr, end - ptr,"nid=%s(%#llx)\n " , nidstr, lcfg->lcfg_nid); }if (lcfg->lcfg_command ==LCFG_MARKER ) {struct cfg_marker *marker =lustre_cfg_buf (lcfg,1 ); - ptr +=snprintf (ptr, end-ptr,"marker=%d(%#x)%s '%s'" , + ptr +=snprintf (ptr, end - ptr,"marker=%d(%#x)%s '%s'" , marker->cm_step, marker->cm_flags, marker->cm_tgtname, marker->cm_comment); }else {int i;for (i =0 ; i < lcfg->lcfg_bufcount; i++) { - ptr +=snprintf (ptr, end-ptr,"%d:%s " , i, + ptr +=snprintf (ptr, end - ptr,"%d:%s " , i,lustre_cfg_string (lcfg, i)); } }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +3 -3
@@ -37,7 +37,7 @@*/ #define DEBUG_SUBSYSTEM S_CLASS -#define D_MOUNT (D_SUPER|D_CONFIG/*|D_WARNING */) +#define D_MOUNT (D_SUPER | D_CONFIG/*|D_WARNING */)#define PRINT_CMD CDEBUG#include "../include/obd.h"
@@ -758,7 +758,7 @@ static int lmd_make_exclusion(struct lustre_mount_data *lmd, const char *ptr) exclude_list[lmd->lmd_exclude_count++] = index; else CDEBUG(D_MOUNT, "ignoring exclude %.*s: type = %#x\n", - (uint)(s2-s1), s1, rc); + (uint)(s2 - s1), s1, rc); s1 = s2;/* now we are pointing at ':' (next exclude) * or ',' (end of excludes)
@@ -1097,7 +1097,7 @@ static int lustre_fill_super(struct super_block *sb, void *data, int silent)struct lustre_sb_info *lsi;int rc; -CDEBUG (D_MOUNT |D_VFSTRACE ,"VFS Op: sb %p\n" , sb); +CDEBUG (D_MOUNT |D_VFSTRACE ,"VFS Op: sb %p\n" , sb); lsi =lustre_init_lsi (sb);if (!lsi)
drivers/staging/lustre/lustre/obdclass/obdo.c +4 -2
@@ -152,12 +152,14 @@ static void iattr_from_obdo(struct iattr *attr, struct obdo *oa, u32 valid) }#if 0 /* you shouldn't be able to change a file's type with setattr */ if (valid &OBD_MD_FLTYPE ) { - attr->ia_mode = (attr->ia_mode & ~S_IFMT )|(oa->o_mode &S_IFMT ); + attr->ia_mode = (attr->ia_mode & ~S_IFMT ) | + (oa->o_mode &S_IFMT ); attr->ia_valid |=ATTR_MODE ; }#endif if (valid &OBD_MD_FLMODE ) { - attr->ia_mode = (attr->ia_mode &S_IFMT )|(oa->o_mode & ~S_IFMT ); + attr->ia_mode = (attr->ia_mode &S_IFMT ) | + (oa->o_mode & ~S_IFMT ); attr->ia_valid |=ATTR_MODE ;if (!in_group_p (make_kgid (&init_user_ns, oa->o_gid)) && !capable (CFS_CAP_FSETID ))
drivers/staging/lustre/lustre/obdecho/echo_internal.h +2 -2
@@ -33,9 +33,9 @@/* The persistent object (i.e. actually stores stuff!) */ #define ECHO_PERSISTENT_OBJID 1ULL -#define ECHO_PERSISTENT_SIZE ((__u64)(1<<20)) +#define ECHO_PERSISTENT_SIZE ((__u64)(1 << 20))/* block size to use for data verification */ -#define OBD_ECHO_BLOCK_SIZE (4<<10) +#define OBD_ECHO_BLOCK_SIZE (4 << 10)#endif
drivers/staging/lustre/lustre/osc/osc_cache.c +1 -1
@@ -2643,7 +2643,7 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io, goto out;spin_lock (&oap->oap_lock); - oap->oap_async_flags |=ASYNC_READY |ASYNC_URGENT ; + oap->oap_async_flags |=ASYNC_READY |ASYNC_URGENT ;spin_unlock (&oap->oap_lock);if (memory_pressure_get ())
drivers/staging/lustre/lustre/osc/osc_cl_internal.h +1 -1
@@ -389,7 +389,7 @@ extern struct lu_device_type osc_device_type;extern struct lu_context_key osc_key;extern struct lu_context_key osc_session_key; -#define OSC_FLAGS (ASYNC_URGENT|ASYNC_READY) +#define OSC_FLAGS (ASYNC_URGENT | ASYNC_READY) int osc_lock_init(const struct lu_env *env, struct cl_object *obj, struct cl_lock *lock,
drivers/staging/lustre/lustre/osc/osc_io.c +1 -1
@@ -165,7 +165,7 @@ static int osc_io_submit(const struct lu_env *env,cl_page_list_move (qout, qin, page);spin_lock (&oap->oap_lock); - oap->oap_async_flags =ASYNC_URGENT |ASYNC_READY ; + oap->oap_async_flags =ASYNC_URGENT |ASYNC_READY ; oap->oap_async_flags |=ASYNC_COUNT_STABLE ;spin_unlock (&oap->oap_lock);
drivers/staging/lustre/lustre/osc/osc_request.c +7 -5
@@ -794,7 +794,7 @@ static int osc_destroy(const struct lu_env *env, struct obd_export *exp,static void osc_announce_cached (struct client_obd *cli,struct obdo *oa,long writing_bytes) { -u32 bits =OBD_MD_FLBLOCKS |OBD_MD_FLGRANT ; +u32 bits =OBD_MD_FLBLOCKS |OBD_MD_FLGRANT ;LASSERT (!(oa->o_valid & bits));
@@ -827,7 +827,7 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa, oa->o_undirty =0 ; }else {long max_in_flight = (cli->cl_max_pages_per_rpc << -PAGE_SHIFT )* +PAGE_SHIFT ) * (cli->cl_max_rpcs_in_flight +1 ); oa->o_undirty =max (cli->cl_dirty_max, max_in_flight); }
@@ -1463,7 +1463,8 @@ static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer, oa->o_valid &OBD_MD_FLFID ? oa->o_parent_oid :0 , oa->o_valid &OBD_MD_FLFID ? oa->o_parent_ver :0 ,POSTID (&oa->o_oi), pga[0 ]->off, - pga[page_count-1]->off + pga[page_count-1]->count - 1); + pga[page_count -1 ]->off + + pga[page_count - 1]->count - 1);CERROR ("original client csum %x (type %x), server csum %x (type %x), client csum now %x\n" , client_cksum, client_cksum_type, server_cksum, cksum_type, new_cksum);
@@ -1565,7 +1566,8 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router ="" ;enum cksum_type cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid&OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid & +OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); client_cksum = osc_checksum_bulk(rc, aa->aa_page_count, aa->aa_ppga, OST_READ,
@@ -1998,7 +2000,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, body =req_capsule_client_get (&req->rq_pill, &RMF_OST_BODY ); crattr->cra_oa = &body->oa;cl_req_attr_set (env, clerq, crattr, -OBD_MD_FLMTIME |OBD_MD_FLCTIME |OBD_MD_FLATIME ); +OBD_MD_FLMTIME |OBD_MD_FLCTIME |OBD_MD_FLATIME );lustre_msg_set_jobid (req->rq_reqmsg, crattr->cra_jobid);
drivers/staging/lustre/lustre/ptlrpc/import.c +4 -2
@@ -307,7 +307,8 @@ void ptlrpc_invalidate_import(struct obd_import *imp)*/ lwi =LWI_TIMEOUT_INTERVAL (cfs_timeout_cap (cfs_time_seconds (timeout)), - (timeout >1 )?cfs_time_seconds (1 ):cfs_time_seconds (1 )/2 , + (timeout >1 ) ?cfs_time_seconds (1 ) : +cfs_time_seconds (1 ) /2 ,NULL ,NULL ); rc = l_wait_event(imp->imp_recovery_waitq, (atomic_read(&imp->imp_inflight) == 0),
@@ -698,7 +699,8 @@ int ptlrpc_connect_import(struct obd_import *imp) request->rq_send_state =LUSTRE_IMP_CONNECTING ;/* Allow a slightly larger reply for future growth compatibility */ req_capsule_set_size (&request->rq_pill, &RMF_CONNECT_DATA ,RCL_SERVER , -sizeof (struct obd_connect_data )+16 *sizeof (__u64)); +sizeof (struct obd_connect_data ) + +16 *sizeof (__u64));ptlrpc_request_set_replen (request); request->rq_interpret_reply = ptlrpc_connect_interpret;
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -191,7 +191,7 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir,LASSERT (!*debugfs_root_ret);LASSERT (!*stats_ret); - svc_stats =lprocfs_alloc_stats (EXTRA_MAX_OPCODES +LUSTRE_MAX_OPCODES , + svc_stats =lprocfs_alloc_stats (EXTRA_MAX_OPCODES +LUSTRE_MAX_OPCODES ,0 );if (!svc_stats)return ;
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +2 -2
@@ -412,7 +412,7 @@ static int ptlrpcd(void *arg)* an argument, describing its "scope". */ rc =lu_context_init (&env.le_ctx, -LCT_CL_THREAD |LCT_REMEMBER |LCT_NOREF ); +LCT_CL_THREAD |LCT_REMEMBER |LCT_NOREF );if (rc ==0 ) { rc =lu_context_init (env.le_ses,LCT_SESSION |LCT_REMEMBER |LCT_NOREF );
@@ -567,7 +567,7 @@ int ptlrpcd_start(struct ptlrpcd_ctl *pc)* ptlrpcd thread (or a thread-set) has to be given an argument, * describing its "scope". */ - rc =lu_context_init (&pc->pc_env.le_ctx,LCT_CL_THREAD |LCT_REMEMBER ); + rc =lu_context_init (&pc->pc_env.le_ctx,LCT_CL_THREAD |LCT_REMEMBER );if (rc !=0 ) goto out;
drivers/staging/lustre/lustre/ptlrpc/service.c +1 -1
@@ -2049,7 +2049,7 @@ static int ptlrpc_main(void *arg) } rc =lu_context_init (&env->le_ctx, - svc->srv_ctx_tags|LCT_REMEMBER |LCT_NOREF ); + svc->srv_ctx_tags |LCT_REMEMBER |LCT_NOREF );if (rc) goto out_srv_fini;
Signature · 1 line
2.7.4
PATCH 10/13 staging/lustre: Fix unnecessary parentheses around variables
In reply to Oleg DrokinFrom: Emoly Liu <[email protected]>
This patch fixes all checkpatch occurences of
"CHECK: Unnecessary parentheses around xxx"
in Lustre code.
--- .../staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 ++-- drivers/staging/lustre/lustre/lov/lov_pool.c | 16 ++++++++-------- drivers/staging/lustre/lustre/obdclass/genops.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/llog.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +1 -1
@@ -978,7 +978,7 @@ struct hsm_user_request {/** Return pointer to data field in a hsm user request */ static inline void *hur_data (struct hsm_user_request *hur) { -return &(hur->hur_user_item[hur->hur_request.hr_itemcount]); +return &hur->hur_user_item[hur->hur_request.hr_itemcount]; }/**
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -940,7 +940,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, }case LCFG_PARAM : {struct lprocfs_static_vars lvars = {NULL }; -struct lov_desc *desc = &(obd->u.lov.desc); +struct lov_desc *desc = &obd->u.lov.desc;if (!desc) { rc = -EINVAL ;
@@ -1460,7 +1460,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, } desc = (struct lov_desc *)data->ioc_inlbuf1; -memcpy (desc, &(lov->desc),sizeof (*desc)); +memcpy (desc, &lov->desc,sizeof (*desc)); uuidp = (struct obd_uuid *)data->ioc_inlbuf2; genp = (__u32 *)data->ioc_inlbuf3;
drivers/staging/lustre/lustre/lov/lov_pool.c +8 -8
@@ -61,7 +61,7 @@ void lov_pool_putref(struct pool_desc *pool)LASSERT (hlist_unhashed (&pool->pool_hash));LASSERT (list_empty (&pool->pool_list));LASSERT (!pool->pool_debugfs_entry); -lov_ost_pool_free (&(pool->pool_obds)); +lov_ost_pool_free (&pool->pool_obds);kfree (pool); } }
@@ -260,7 +260,7 @@ static int pool_proc_show(struct seq_file *s, void *v) tgt =pool_tgt (iter->pool, iter->idx);up_read (&pool_tgt_rw_sem (iter->pool));if (tgt) -seq_printf (s,"%s\n" ,obd_uuid2str (&(tgt->ltd_uuid))); +seq_printf (s,"%s\n" ,obd_uuid2str (&tgt->ltd_uuid));return 0 ; }
@@ -400,7 +400,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)struct pool_desc *new_pool;int rc; - lov = &(obd->u.lov); + lov = &obd->u.lov;if (strlen (poolname) >LOV_MAXPOOLNAME )return -ENAMETOOLONG ;
@@ -471,7 +471,7 @@ int lov_pool_del(struct obd_device *obd, char *poolname)struct lov_obd *lov;struct pool_desc *pool; - lov = &(obd->u.lov); + lov = &obd->u.lov;/* lookup and kill hash reference */ pool =cfs_hash_del_key (lov->lov_pools_hash_body, poolname);
@@ -503,7 +503,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)unsigned int lov_idx;int rc; - lov = &(obd->u.lov); + lov = &obd->u.lov; pool =cfs_hash_lookup (lov->lov_pools_hash_body, poolname);if (!pool)
@@ -517,7 +517,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)if (!lov->lov_tgts[lov_idx])continue ;if (obd_uuid_equals (&ost_uuid, - &(lov->lov_tgts[lov_idx]->ltd_uuid))) + &lov->lov_tgts[lov_idx]->ltd_uuid))break ; }/* test if ost found in lov */
@@ -547,7 +547,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)unsigned int lov_idx;int rc =0 ; - lov = &(obd->u.lov); + lov = &obd->u.lov; pool =cfs_hash_lookup (lov->lov_pools_hash_body, poolname);if (!pool)
@@ -562,7 +562,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)continue ;if (obd_uuid_equals (&ost_uuid, - &(lov->lov_tgts[lov_idx]->ltd_uuid))) + &lov->lov_tgts[lov_idx]->ltd_uuid))break ; }
drivers/staging/lustre/lustre/obdclass/genops.c +2 -2
@@ -166,10 +166,10 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, !type->typ_name) goto failed; - *(type->typ_dt_ops) = *dt_ops; + *type->typ_dt_ops = *dt_ops;/* md_ops is optional */ if (md_ops) - *(type->typ_md_ops) = *md_ops; + *type->typ_md_ops = *md_ops;strcpy (type->typ_name, name);spin_lock_init (&type->obd_type_lock);
drivers/staging/lustre/lustre/obdclass/llog.c +1 -1
@@ -80,7 +80,7 @@ static void llog_free_handle(struct llog_handle *loghandle)LASSERT (list_empty (&loghandle->u.phd.phd_entry)); else if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) LASSERT(list_empty(&loghandle->u.chd.chd_head)); -LASSERT (sizeof (*(loghandle->lgh_hdr)) ==LLOG_CHUNK_SIZE ); +LASSERT (sizeof (*loghandle->lgh_hdr) ==LLOG_CHUNK_SIZE );kfree (loghandle->lgh_hdr); out:kfree (loghandle);
drivers/staging/lustre/lustre/obdclass/lustre_handles.c +1 -1
@@ -214,7 +214,7 @@ static int cleanup_all_handles(void)struct portals_handle *h;spin_lock (&handle_hash[i].lock); -list_for_each_entry_rcu (h, &(handle_hash[i].head), h_link) { +list_for_each_entry_rcu (h, &handle_hash[i].head, h_link) {CERROR ("force clean handle %#llx addr %p ops %p\n" , h->h_cookie, h, h->h_ops);
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
@@ -1026,7 +1026,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, oldfs =get_fs ();set_fs (KERNEL_DS ); - rc = (var->fops->write)(&fakefile, sval, + rc = var->fops->write (&fakefile, sval, vallen,NULL );set_fs (oldfs); }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +1 -1
@@ -394,7 +394,7 @@ int lustre_start_mgc(struct super_block *sb) lsi->lsi_lmd->lmd_flags & LMD_FLG_NOIR) data->ocd_connect_flags &= ~OBD_CONNECT_IMP_RECOV; data->ocd_version =LUSTRE_VERSION_CODE ; - rc =obd_connect (NULL , &exp, obd, &(obd->obd_uuid), data,NULL ); + rc =obd_connect (NULL , &exp, obd, &obd->obd_uuid, data,NULL );if (rc) {CERROR ("connect failed %d\n" , rc); goto out;
drivers/staging/lustre/lustre/osc/osc_request.c +1 -1
@@ -2634,7 +2634,7 @@ static int osc_getstripe(struct lov_stripe_md *lsm, lmm_objects = &(((struct lov_user_md_v1 *)lumk)->lmm_objects[0 ]); else - lmm_objects = &(lumk->lmm_objects[0 ]); + lmm_objects = &lumk->lmm_objects[0 ]; lmm_objects->l_ost_oi = lsm->lsm_oi; }else { lum_size =lov_mds_md_size (0 , lum.lmm_magic);
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +3 -3
@@ -1941,9 +1941,9 @@ void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,int i;for (i =0 ; i < stripe_count; i++) { -lustre_swab_ost_id (&(lod[i].l_ost_oi)); -__swab32s (&(lod[i].l_ost_gen)); -__swab32s (&(lod[i].l_ost_idx)); +lustre_swab_ost_id (&lod[i].l_ost_oi); +__swab32s (&lod[i].l_ost_gen); +__swab32s (&lod[i].l_ost_idx); } }EXPORT_SYMBOL (lustre_swab_lov_user_md_objects);
Signature · 1 line
2.7.4
PATCH 11/13 staging/lustre: Make alignment match open parenthesis
In reply to Oleg DrokinFrom: Emoly Liu <[email protected]>
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.
--- .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c | 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 10 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/dir.c | 3 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 22 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 288 ++++++++++----------- 31 files changed, 257 insertions(+), 245 deletions(-)
drivers/staging/lustre/include/linux/libcfs/libcfs.h +3 -3
@@ -138,8 +138,8 @@ struct lnet_debugfs_symlink_def {void lustre_insert_debugfs (struct ctl_table *table,const struct lnet_debugfs_symlink_def *symlinks);int lprocfs_call_handler (void *data,int write,loff_t *ppos, -void __user *buffer,size_t *lenp, -int (*handler)(void *data,int write, -loff_t pos,void __user *buffer,int len)); +void __user *buffer,size_t *lenp, +int (*handler)(void *data,int write,loff_t pos, +void __user *buffer,int len));#endif /* _LIBCFS_H */
drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +5 -5
@@ -247,19 +247,19 @@ do { \#define LCONSOLE_EMERG (format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__) int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata, - const char *format1, ...) + const char *format1, ...) __printf(2, 3); int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, - const char *format1, - va_list args, const char *format2, ...) + const char *format1, + va_list args, const char *format2, ...) __printf(4, 5);/* other external symbols that tracefile provides: */ int cfs_trace_copyin_string (char *knl_buffer,int knl_buffer_nob, -const char __user *usr_buffer,int usr_buffer_nob); +const char __user *usr_buffer,int usr_buffer_nob);int cfs_trace_copyout_string (char __user *usr_buffer,int usr_buffer_nob, -const char *knl_buffer,char *append); +const char *knl_buffer,char *append);#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +1 -1
@@ -618,7 +618,7 @@ static int kiblnd_get_completion_vector(struct kib_conn *conn, int cpt) }struct kib_conn *kiblnd_create_conn (struct kib_peer *peer,struct rdma_cm_id *cmid, -int state,int version) +int state,int version) {/* * CAVEAT EMPTOR:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +3 -2
@@ -40,9 +40,10 @@ static void kiblnd_peer_alive(struct kib_peer *peer);static void kiblnd_peer_connect_failed (struct kib_peer *peer,int active,int error);static void kiblnd_check_sends (struct kib_conn *conn);static void kiblnd_init_tx_msg (lnet_ni_t *ni,struct kib_tx *tx, -int type,int body_nob); +int type,int body_nob);static int kiblnd_init_rdma (struct kib_conn *conn,struct kib_tx *tx,int type, -int resid,struct kib_rdma_desc *dstrd,__u64 dstcookie); +int resid,struct kib_rdma_desc *dstrd, +__u64 dstcookie);static void kiblnd_queue_tx_locked (struct kib_tx *tx,struct kib_conn *conn);static void kiblnd_queue_tx (struct kib_tx *tx,struct kib_conn *conn);static void kiblnd_unmap_tx (lnet_ni_t *ni,struct kib_tx *tx);
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +1 -1
@@ -631,7 +631,7 @@ int ksocknal_close_peer_conns_locked(struct ksock_peer *peer,int ksocknal_close_conn_and_siblings (struct ksock_conn *conn,int why);int ksocknal_close_matching_conns (lnet_process_id_t id,__u32 ipaddr);struct ksock_conn *ksocknal_find_conn_locked (struct ksock_peer *peer, -struct ksock_tx *tx,int nonblk); +struct ksock_tx *tx,int nonblk);int ksocknal_launch_packet (lnet_ni_t *ni,struct ksock_tx *tx,lnet_process_id_t id);
drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c +2 -2
@@ -95,8 +95,8 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg, err =crypto_ahash_setkey (tfm, key, key_len); else if ((*type)->cht_key != 0) err =crypto_ahash_setkey (tfm, - (unsigned char *)&((*type)->cht_key), - (*type)->cht_size); + (unsigned char *)&((*type)->cht_key), + (*type)->cht_size);if (err !=0 ) {ahash_request_free (*req);
drivers/staging/lustre/lustre/include/cl_object.h +1 -1
@@ -320,7 +320,7 @@ struct cl_object_operations {* to be used instead of newly created. */ int (*coo_page_init)(const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,pgoff_t index); +struct cl_page *page,pgoff_t index);/** * Initialize lock slice for this layer. Called top-to-bottom through * every object layer when a new cl_lock is instantiated. Layer
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +2 -2
@@ -221,7 +221,7 @@ void ldlm_extent_unlink_lock(struct ldlm_lock *lock) }void ldlm_extent_policy_wire_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy) +ldlm_policy_data_t *lpolicy) {memset (lpolicy,0 ,sizeof (*lpolicy)); lpolicy->l_extent.start = wpolicy->l_extent.start;
@@ -230,7 +230,7 @@ void ldlm_extent_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy, }void ldlm_extent_policy_local_to_wire (const ldlm_policy_data_t *lpolicy, -ldlm_wire_policy_data_t *wpolicy) +ldlm_wire_policy_data_t *wpolicy) {memset (wpolicy,0 ,sizeof (*wpolicy)); wpolicy->l_extent.start = lpolicy->l_extent.start;
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +2 -2
@@ -166,7 +166,7 @@ reprocess:*/ list_for_each (tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link);if (ldlm_same_flock_owner (lock, req)) { ownlocks = tmp;break ;
@@ -182,7 +182,7 @@ reprocess:*/ list_for_each (tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link);if (ldlm_same_flock_owner (lock, req)) {if (!ownlocks)
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +8 -9
@@ -100,8 +100,8 @@ enum {int ldlm_cancel_lru (struct ldlm_namespace *ns,int nr,enum ldlm_cancel_flags sync,int flags);int ldlm_cancel_lru_local (struct ldlm_namespace *ns, -struct list_head *cancels,int count,int max, -enum ldlm_cancel_flags cancel_flags,int flags); +struct list_head *cancels,int count,int max, +enum ldlm_cancel_flags cancel_flags,int flags);extern int ldlm_enqueue_min;/* ldlm_resource.c */
@@ -200,8 +200,7 @@ ldlm_interval_extent(struct ldlm_interval *node)LASSERT (!list_empty (&node->li_group)); - lock = list_entry(node->li_group.next, struct ldlm_lock, - l_sl_policy); + lock = list_entry(node->li_group.next, struct ldlm_lock, l_sl_policy);return &lock->l_policy_data.l_extent; }
@@ -302,7 +301,7 @@ static inline int is_granted_or_cancelled(struct ldlm_lock *lock)lock_res_and_lock (lock);if ((lock->l_req_mode == lock->l_granted_mode) && - !ldlm_is_cp_reqd (lock)) + !ldlm_is_cp_reqd (lock)) ret =1 ;else if (ldlm_is_failed (lock) ||ldlm_is_cancel (lock)) ret =1 ;
@@ -326,13 +325,13 @@ void ldlm_ibits_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,void ldlm_ibits_policy_local_to_wire (const ldlm_policy_data_t *lpolicy,ldlm_wire_policy_data_t *wpolicy);void ldlm_extent_policy_wire_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_extent_policy_local_to_wire (const ldlm_policy_data_t *lpolicy, -ldlm_wire_policy_data_t *wpolicy); +ldlm_wire_policy_data_t *wpolicy);void ldlm_flock_policy_wire18_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_flock_policy_wire21_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_flock_policy_local_to_wire (const ldlm_policy_data_t *lpolicy,ldlm_wire_policy_data_t *wpolicy);
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +4 -4
@@ -82,7 +82,7 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,if (priority) {list_del (&item->oic_item);list_add (&item->oic_item, - &imp->imp_conn_list); + &imp->imp_conn_list); item->oic_last_attempt =0 ; } CDEBUG(D_HA, "imp %p@%s: found existing conn %s%s\n",
@@ -102,7 +102,7 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,list_add (&imp_conn->oic_item, &imp->imp_conn_list); else list_add_tail(&imp_conn->oic_item, - &imp->imp_conn_list); + &imp->imp_conn_list);CDEBUG (D_HA ,"imp %p@%s: add connection %s at %s\n" , imp, imp->imp_obd->obd_name, uuid->uuid, (priority ?"head" :"tail" ));
@@ -690,7 +690,7 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)if (rs->rs_transno > exp->exp_last_committed) {/* not committed already */ list_add_tail (&rs->rs_obd_list, - &exp->exp_uncommitted_replies); + &exp->exp_uncommitted_replies); }spin_unlock (&exp->exp_uncommitted_replies_lock);
@@ -795,7 +795,7 @@ void ldlm_dump_export_locks(struct obd_export *exp)CERROR ("dumping locks for export %p,ignore if the unmount doesn't hang\n" , exp);list_for_each_entry (lock, &exp->exp_locks_list, - l_exp_refs_link) + l_exp_refs_link)LDLM_ERROR (lock,"lock:" ); }spin_unlock (&exp->exp_locks_list_guard);
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +13 -13
@@ -937,7 +937,7 @@ static void search_granted_lock(struct list_head *queue,/* go to next policy group within mode group */ tmp = policy_end->l_res_link.next; lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link); }/* loop over policy groups within the mode group */ /* insert point is last lock of the mode group,
@@ -1103,7 +1103,7 @@ static struct ldlm_lock *search_queue(struct list_head *queue,* of bits. */ if (lock->l_resource->lr_type ==LDLM_IBITS && - ((lock->l_policy_data.l_inodebits.bits & + ((lock->l_policy_data.l_inodebits.bits & policy->l_inodebits.bits) != policy->l_inodebits.bits))continue ;
@@ -1363,12 +1363,12 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (size ==sizeof (struct ost_lvb )) {if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb); + &RMF_DLM_LVB , + lustre_swab_ost_lvb);else lvb =req_capsule_server_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb); + &RMF_DLM_LVB , + lustre_swab_ost_lvb);if (unlikely (!lvb)) {LDLM_ERROR (lock,"no LVB" );return -EPROTO ;
@@ -1380,8 +1380,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb_v1); + &RMF_DLM_LVB , + lustre_swab_ost_lvb_v1);else lvb = req_capsule_server_sized_swab_get(pill, &RMF_DLM_LVB, size,
@@ -1405,12 +1405,12 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (size ==sizeof (struct lquota_lvb )) {if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_lquota_lvb); + &RMF_DLM_LVB , + lustre_swab_lquota_lvb);else lvb =req_capsule_server_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_lquota_lvb); + &RMF_DLM_LVB , + lustre_swab_lquota_lvb);if (unlikely (!lvb)) {LDLM_ERROR (lock,"no LVB" );return -EPROTO ;
@@ -1688,7 +1688,7 @@ static int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)return -ENOENT ; gl_work = list_entry(arg->list->next, struct ldlm_glimpse_work, - gl_list); + gl_list);list_del_init (&gl_work->gl_list); lock = gl_work->gl_lock;
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +11 -10
@@ -706,12 +706,12 @@ static struct ldlm_bl_work_item *ldlm_bl_get_work(struct ldlm_bl_pool *blp)if (!list_empty (&blp->blp_list) && (list_empty (&blp->blp_prio_list) || num_bl ==0 )) blwi =list_entry (blp->blp_list.next, - struct ldlm_bl_work_item, blwi_entry); + struct ldlm_bl_work_item, blwi_entry);else if (!list_empty (&blp->blp_prio_list)) blwi =list_entry (blp->blp_prio_list.next, - struct ldlm_bl_work_item, - blwi_entry); + struct ldlm_bl_work_item, + blwi_entry);if (blwi) {if (++num_bl >=atomic_read (&blp->blp_num_threads))
@@ -741,7 +741,7 @@ static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp)init_completion (&bltd.bltd_comp); bltd.bltd_num =atomic_read (&blp->blp_num_threads);snprintf (bltd.bltd_name,sizeof (bltd.bltd_name), -"ldlm_bl_%02d" , bltd.bltd_num); +"ldlm_bl_%02d" , bltd.bltd_num); task =kthread_run (ldlm_bl_thread_main, &bltd,"%s" , bltd.bltd_name);if (IS_ERR (task)) { CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %ld\n",
@@ -786,8 +786,8 @@ static int ldlm_bl_thread_main(void *arg)if (!blwi) {atomic_dec (&blp->blp_busy_threads);l_wait_event_exclusive (blp->blp_waitq, - (blwi =ldlm_bl_get_work (blp)), - &lwi); + (blwi =ldlm_bl_get_work (blp)), + &lwi); busy =atomic_inc_return (&blp->blp_busy_threads); }else { busy =atomic_read (&blp->blp_busy_threads);
@@ -1094,16 +1094,17 @@ int ldlm_init(void)return -ENOMEM ; ldlm_lock_slab =kmem_cache_create ("ldlm_locks" , -sizeof (struct ldlm_lock ),0 , -SLAB_HWCACHE_ALIGN |SLAB_DESTROY_BY_RCU ,NULL ); +sizeof (struct ldlm_lock ),0 , +SLAB_HWCACHE_ALIGN | +SLAB_DESTROY_BY_RCU ,NULL );if (!ldlm_lock_slab) {kmem_cache_destroy (ldlm_resource_slab);return -ENOMEM ; } ldlm_interval_slab =kmem_cache_create ("interval_node" , -sizeof (struct ldlm_interval ), -0 ,SLAB_HWCACHE_ALIGN ,NULL ); +sizeof (struct ldlm_interval ), +0 ,SLAB_HWCACHE_ALIGN ,NULL );if (!ldlm_interval_slab) {kmem_cache_destroy (ldlm_resource_slab);kmem_cache_destroy (ldlm_lock_slab);
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +2 -2
@@ -995,7 +995,7 @@ static int ldlm_pools_thread_main(void *arg)wake_up (&thread->t_ctl_waitq);CDEBUG (D_DLMTRACE ,"%s: pool thread starting, process %d\n" , -"ldlm_poold" ,current_pid ()); +"ldlm_poold" ,current_pid ());while (1 ) {struct l_wait_info lwi;
@@ -1025,7 +1025,7 @@ static int ldlm_pools_thread_main(void *arg)wake_up (&thread->t_ctl_waitq);CDEBUG (D_DLMTRACE ,"%s: pool thread exiting, process %d\n" , -"ldlm_poold" ,current_pid ()); +"ldlm_poold" ,current_pid ());complete_and_exit (&ldlm_pools_comp,0 ); }
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +4 -6
@@ -1180,8 +1180,7 @@ static enum ldlm_policy_res ldlm_cancel_lrur_policy(struct ldlm_namespace *ns, slv =ldlm_pool_get_slv (pl); lvf =ldlm_pool_get_lvf (pl); - la =cfs_duration_sec (cfs_time_sub (cur, - lock->l_last_used)); + la =cfs_duration_sec (cfs_time_sub (cur, lock->l_last_used)); lv = lvf * la * unused;/* Inform pool about current CLV to see it via debugfs. */
@@ -1374,7 +1373,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns,break ;list_for_each_entry_safe (lock, next, &ns->ns_unused_list, - l_lru) { + l_lru) {/* No locks which got blocking requests. */ LASSERT (!ldlm_is_bl_ast (lock));
@@ -1610,8 +1609,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,*/ while (count >0 ) {LASSERT (!list_empty (cancels)); - lock = list_entry(cancels->next, struct ldlm_lock, - l_bl_ast); + lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast);LASSERT (lock->l_conn_export);if (exp_connect_cancelset (lock->l_conn_export)) {
@@ -2013,7 +2011,7 @@ static void ldlm_cancel_unused_locks_for_replay(struct ldlm_namespace *ns) LCF_LOCAL, LDLM_CANCEL_NO_WAIT);CDEBUG (D_DLMTRACE ,"Canceled %d unused locks from namespace %s\n" , - canceled,ldlm_ns_name (ns)); + canceled,ldlm_ns_name (ns)); }int ldlm_replay_locks (struct obd_import *imp)
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +2 -3
@@ -758,8 +758,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,*/ lock_res (res);list_for_each (tmp, q) { - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + lock = list_entry(tmp, struct ldlm_lock, l_res_link);if (ldlm_is_cleaned (lock)) { lock =NULL ;continue ;
@@ -1386,7 +1385,7 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res)if (!list_empty (&res->lr_granted)) {CDEBUG (level,"Granted locks (in reverse order):\n" );list_for_each_entry_reverse (lock, &res->lr_granted, - l_res_link) { + l_res_link) {LDLM_DEBUG_LIMIT (level, lock,"###" );if (!(level &D_CANTMASK ) && ++granted > ldlm_dump_granted_max) {
drivers/staging/lustre/lustre/llite/dir.c +2 -1
@@ -307,7 +307,8 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash,* the page we want. */ ll_release_page (page, -le32_to_cpu (dp->ldp_flags) &LDF_COLLIDE ); +le32_to_cpu (dp->ldp_flags) & +LDF_COLLIDE ); page =NULL ; } }else {
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -2
@@ -1140,8 +1140,8 @@ static int ll_setattr_done_writing(struct inode *inode, rc =ll_som_update (inode, op_data); else if (rc) {CERROR ("%s: inode " DFID " mdc truncate failed: rc = %d\n" , -ll_i2sbi (inode)->ll_md_exp->exp_obd->obd_name, -PFID (ll_inode2fid (inode)), rc); +ll_i2sbi (inode)->ll_md_exp->exp_obd->obd_name, +PFID (ll_inode2fid (inode)), rc); }return rc; }
drivers/staging/lustre/lustre/llite/rw.c +2 -2
@@ -648,8 +648,8 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, {unsigned long stride_gap = index - ras->ras_last_readpage -1 ; -if (!stride_io_mode (ras) && (stride_gap !=0 || - ras->ras_consecutive_stride_requests ==0 )) { +if ((stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 ) && + !stride_io_mode (ras)) { ras->ras_stride_pages = ras->ras_consecutive_pages; ras->ras_stride_length = ras->ras_consecutive_pages + stride_gap;
drivers/staging/lustre/lustre/llite/statahead.c +2 -1
@@ -918,7 +918,8 @@ static void ll_statahead_one(struct dentry *parent, const char *entry_name,if (rc) { rc1 =ll_sa_entry_to_stated (sai, entry, - rc <0 ?SA_ENTRY_INVA :SA_ENTRY_SUCC ); + rc <0 ?SA_ENTRY_INVA : +SA_ENTRY_SUCC );if (rc1 ==0 && entry->se_index == sai->sai_index_wait)wake_up (&sai->sai_waitq); }else {
drivers/staging/lustre/lustre/llite/vvp_page.c +2 -2
@@ -249,7 +249,7 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int ioretset_bit (AS_EIO , &inode->i_mapping->flags);if ((ioret == -ESHUTDOWN || ioret == -EINTR ) && - obj->vob_discard_page_warned ==0 ) { + obj->vob_discard_page_warned ==0 ) { obj->vob_discard_page_warned =1 ;ll_dirty_page_discard_warn (vmpage, ioret); }
@@ -549,7 +549,7 @@ static const struct cl_page_operations vvp_transient_page_ops = { };int vvp_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,pgoff_t index) +struct cl_page *page,pgoff_t index) {struct vvp_page *vpg =cl_object_page_slice (obj, page);struct page *vmpage = page->cp_vmpage;
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -2161,8 +2161,8 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, &mgi->group, set); }else if (next_id) { err =obd_set_info_async (env, tgt->ltd_exp, - keylen, key, vallen, - ((struct obd_id_info *)val)->data, set); + keylen, key, vallen, + ((struct obd_id_info *)val)->data, set); }else {/* Only want a specific OSC */ if (check_uuid &&
drivers/staging/lustre/lustre/mdc/mdc_locks.c +2 -1
@@ -662,7 +662,8 @@ static int mdc_finish_enqueue(struct obd_export *exp, lvb_len =req_capsule_get_size (pill, &RMF_DLM_LVB ,RCL_SERVER );if (lvb_len >0 ) { lvb_data =req_capsule_server_sized_get (pill, - &RMF_DLM_LVB , lvb_len); + &RMF_DLM_LVB , + lvb_len);if (!lvb_data)return -EPROTO ; }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +1 -1
@@ -68,7 +68,7 @@ static void (*kill_super_cb)(struct super_block *sb);* this log, and is added to the mgc's list of logs to follow. */ int lustre_process_log (struct super_block *sb,char *logname, -struct config_llog_instance *cfg) +struct config_llog_instance *cfg) {struct lustre_cfg *lcfg;struct lustre_cfg_bufs *bufs;
drivers/staging/lustre/lustre/osc/osc_cache.c +2 -2
@@ -958,8 +958,8 @@ static int osc_extent_wait(const struct lu_env *env, struct osc_extent *ext, rc =l_wait_event (ext->oe_waitq,extent_wait_cb (ext, state), &lwi);if (rc == -ETIMEDOUT ) {OSC_EXTENT_DUMP (D_ERROR , ext, -"%s: wait ext to %d timedout, recovery in progress?\n" , -osc_export (obj)->exp_obd->obd_name, state); +"%s: wait ext to %d timedout, recovery in progress?\n" , +osc_export (obj)->exp_obd->obd_name, state); lwi =LWI_INTR (NULL ,NULL ); rc = l_wait_event(ext->oe_waitq, extent_wait_cb(ext, state),
drivers/staging/lustre/lustre/ptlrpc/niobuf.c +2 -1
@@ -398,7 +398,8 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)lustre_msg_set_status (req->rq_repmsg,ptlrpc_status_hton (req->rq_status));lustre_msg_set_opc (req->rq_repmsg, - req->rq_reqmsg ?lustre_msg_get_opc (req->rq_reqmsg) :0 ); + req->rq_reqmsg ? +lustre_msg_get_opc (req->rq_reqmsg) :0 );target_pack_pool_reply (req);
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +3 -2
@@ -1203,8 +1203,9 @@ __u32 lustre_msg_calc_cksum(struct lustre_msg *msg)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , (unsigned char *)pb, -lustre_msg_buflen (msg,MSG_PTLRPC_BODY_OFF ), -NULL ,0 , (unsigned char *)&crc, &hsize); +lustre_msg_buflen (msg, +MSG_PTLRPC_BODY_OFF ), +NULL ,0 , (unsigned char *)&crc, &hsize);return crc; }default :
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +3 -2
@@ -523,8 +523,9 @@ int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,for (i =0 ; i < desc->bd_iov_count; i++) {cfs_crypto_hash_update_page (hdesc, desc->bd_iov[i].bv_page, - desc->bd_iov[i].bv_offset & ~PAGE_MASK , - desc->bd_iov[i].bv_len); + desc->bd_iov[i].bv_offset & + ~PAGE_MASK , + desc->bd_iov[i].bv_len); }if (hashsize > buflen) {
drivers/staging/lustre/lustre/ptlrpc/sec_plain.c +12 -6
@@ -249,9 +249,12 @@ int plain_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , -lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF ,0 ), -lustre_msg_buflen (msg,PLAIN_PACK_MSG_OFF ), -NULL ,0 , (unsigned char *)&cksum, &hsize); +lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF , +0 ), +lustre_msg_buflen (msg, +PLAIN_PACK_MSG_OFF ), +NULL ,0 , (unsigned char *)&cksum, + &hsize);if (cksum != msg->lm_cksum) { CDEBUG(D_SEC, "early reply checksum mismatch: %08x != %08x\n",
@@ -869,9 +872,12 @@ int plain_authorize(struct ptlrpc_request *req)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , -lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF ,0 ), -lustre_msg_buflen (msg,PLAIN_PACK_MSG_OFF ), -NULL ,0 , (unsigned char *)&msg->lm_cksum, &hsize); +lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF , +0 ), +lustre_msg_buflen (msg, +PLAIN_PACK_MSG_OFF ), +NULL ,0 , (unsigned char *)&msg->lm_cksum, + &hsize); req->rq_reply_off =0 ; }
drivers/staging/lustre/lustre/ptlrpc/service.c +12 -10
@@ -1982,11 +1982,12 @@ ptlrpc_wait_event(struct ptlrpc_service_part *svcpt,cond_resched ();l_wait_event_exclusive_head (svcpt->scp_waitq, -ptlrpc_thread_stopping (thread) || -ptlrpc_server_request_incoming (svcpt) || -ptlrpc_server_request_pending (svcpt, false) || -ptlrpc_rqbd_pending (svcpt) || -ptlrpc_at_check (svcpt), &lwi); +ptlrpc_thread_stopping (thread) || +ptlrpc_server_request_incoming (svcpt) || +ptlrpc_server_request_pending (svcpt, + false) || +ptlrpc_rqbd_pending (svcpt) || +ptlrpc_at_check (svcpt), &lwi);if (ptlrpc_thread_stopping (thread))return -EINTR ;
@@ -2349,7 +2350,7 @@ static void ptlrpc_svcpt_stop_threads(struct ptlrpc_service_part *svcpt)while (!list_empty (&zombie)) { thread =list_entry (zombie.next, - struct ptlrpc_thread, t_link); + struct ptlrpc_thread, t_link);list_del (&thread->t_link);kfree (thread); }
@@ -2539,8 +2540,8 @@ int ptlrpc_hr_init(void)LASSERT (hrp->hrp_nthrs >0 ); hrp->hrp_thrs =kzalloc_node (hrp->hrp_nthrs *sizeof (*hrt),GFP_NOFS , -cfs_cpt_spread_node (ptlrpc_hr.hr_cpt_table, - i)); +cfs_cpt_spread_node (ptlrpc_hr.hr_cpt_table, + i));if (!hrp->hrp_thrs) { rc = -ENOMEM ; goto out;
@@ -2593,7 +2594,8 @@ static void ptlrpc_wait_replies(struct ptlrpc_service_part *svcpt) NULL, NULL); rc =l_wait_event (svcpt->scp_waitq, -atomic_read (&svcpt->scp_nreps_difficult) ==0 , &lwi); +atomic_read (&svcpt->scp_nreps_difficult) ==0 , + &lwi);if (rc ==0 )break ; CWARN("Unexpectedly long timeout %s %p\n",
@@ -2639,7 +2641,7 @@ ptlrpc_service_unlink_rqbd(struct ptlrpc_service *svc)* event with its 'unlink' flag set for each posted rqbd */ list_for_each_entry (rqbd, &svcpt->scp_rqbd_posted, - rqbd_list) { + rqbd_list) { rc =LNetMDUnlink (rqbd->rqbd_md_h);LASSERT (rc ==0 || rc == -ENOENT ); }
drivers/staging/lustre/lustre/ptlrpc/wiretest.c +144 -144
508 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 12/13 staging/lustre: Remove unused cp_error from struct cl_page
In reply to Oleg Drokincp_error member is not really set anywhere, so kill it and the only printing user of it too.
--- drivers/staging/lustre/lustre/include/cl_object.h | 2 -- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/include/cl_object.h +0 -2
@@ -726,8 +726,6 @@ struct cl_page {struct mutex cp_mutex;/** Linkage of pages within cl_req. */ struct list_head cp_flight; -/** Transfer error. */ -int cp_error;/** * Page type. Only CPT_TRANSIENT is used so far. Immutable after
drivers/staging/lustre/lustre/obdclass/cl_page.c +2 -2
@@ -989,9 +989,9 @@ void cl_page_header_print(const struct lu_env *env, void *cookie, lu_printer_t printer, const struct cl_page *pg) { (*printer)(env, cookie, -"page@%p[%d %p %d %d %d %p %p %#x]\n" , +"page@%p[%d %p %d %d %p %p %#x]\n" , pg,atomic_read (&pg->cp_ref), pg->cp_obj, - pg->cp_state, pg->cp_error, pg->cp_type, + pg->cp_state, pg->cp_type, pg->cp_owner, pg->cp_req, pg->cp_flags); }EXPORT_SYMBOL (cl_page_header_print);
Signature · 1 line
2.7.4
PATCH 13/13 Add James Simmons as another Lustre maintainer
In reply to Oleg DrokinJames Simmons is also spendign a lot of efforts on cleaning up staging tree Lustre code and also
helps to sync up all the missing changes from the other tree.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -11154,6 +11154,7 @@ F: drivers/staging/media/lirc/ STAGING - LUSTRE PARALLEL FILESYSTEM M: Oleg Drokin <[email protected]> M: Andreas Dilger <[email protected]> +M: James Simmons <[email protected]> L: lustre-devel at lists.lustre.org (moderated for non-subscribers) W: http://wiki.lustre.org/ S: Maintained
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerRe: [PATCH 09/13] staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}'
In reply to Oleg DrokinQuoted 9 lines · Oleg Drokin
From: Emoly Liu <[email protected]>
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code.Signed-off-by Emoly Liu <[email protected]>Signed-off-by Oleg Drokin <[email protected]>---
This patch doesn't apply at all :(
can you rebase it and resend?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 11/13] staging/lustre: Make alignment match open parenthesis
In reply to Oleg DrokinQuoted 9 lines · Oleg Drokin
From: Emoly Liu <[email protected]>
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.Signed-off-by Emoly Liu <[email protected]>Signed-off-by Oleg Drokin <[email protected]>---
Doesn't apply :(
Greg Kroah-Hartman
maintainerRe: [PATCH 12/13] staging/lustre: Remove unused cp_error from struct cl_page
In reply to Oleg DrokinQuoted 8 lines · Oleg Drokin
cp_errormember is not really set anywhere, so kill it and the only printing user of it too.Signed-off-by Oleg Drokin <[email protected]>--- drivers/staging/lustre/lustre/include/cl_object.h | 2 -- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
Doesn't apply :(