Skip to content

Master sync round 3 v2 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f6ca161
staging/lustre/llite: restore ll_fiemap
Nov 6, 2013
c09fcd5
staging/lustre: remove lu_target.h
Nov 12, 2013
dd7432f
staging/lustre: remove llog_server.c
Nov 12, 2013
be520d0
staging/lustre/llite: Access to released file trigs a restore
lafoucriere Oct 29, 2013
0adefc3
staging/lustre: validate open handle cookies
jhammond-intel Oct 29, 2013
29e7998
staging/lustre/llite: use correct FID in ll_och_fill()
jhammond-intel Oct 29, 2013
b3f0deb
staging/lustre/hsm: Implementation of exclusive open
Oct 29, 2013
0129291
staging/lustre/lnet: Fix assert on empty group in selftest module
Oct 29, 2013
51aed5b
staging/lustre/ldlm: fix resource/fid check, use DLDLMRES
Oct 29, 2013
da1f3d6
staging/lustre/server: use unified request handler for MGS
miketappro Oct 31, 2013
10cac43
staging/lustre/llog: MGC to use OSD API for backup logs
Oct 31, 2013
3e63919
staging/lustre/nfs: writing to new files will return ENOENT
paf-49 Oct 31, 2013
5a2ea21
staging/lustre/autoconf: remove vectored fops tests
jasimmons1973 Oct 31, 2013
a9b9e28
staging/lustre/autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test
jasimmons1973 Nov 12, 2013
5b110d4
staging/lustre/llog: fix return value of llog_alloc_handle
mtfs Oct 31, 2013
ad93c88
staging/lustre/lov: convert magic to host-endian in lov_dump_lmm()
jhammond-intel Oct 31, 2013
487e629
staging/lustre/ptlrpc: Fix race during exp_flock_hash creation
Oct 31, 2013
9294a63
staging/lustre/mdc: prevent fall through in mdc_iocontrol()
jhammond-intel Oct 31, 2013
a76f1e7
staging/lustre/lu: shrink lu_object by 8 bytes on x86_64
jhammond-intel Oct 31, 2013
a79516a
staging/lustre/mdt: HSM coordinator client interface
lafoucriere Oct 31, 2013
bec2d7e
staging/lustre/mdt: HSM coordinator agent interface
lafoucriere Oct 31, 2013
0ab6895
staging/lustre/scrub: OI scrub on OST
Nasf-Fan Oct 31, 2013
2e5aa55
staging/lustre/scrub: control OI scrub on OST from user space
Nasf-Fan Oct 31, 2013
3de6183
staging/lustre/llite: don't check for O_CREAT in it_create_mode
jhammond-intel Oct 31, 2013
de4d052
staging/lustre/build: clean up unused variables and dead code
Oct 31, 2013
c187490
staging/lustre/build: fix compilation issue with is_compat_task
Nov 1, 2013
9a47d5a
staging/lustre/ptlrpc: Fix a crash when dereferencing NULL pointer
Nov 1, 2013
5d1548c
staging/lustre/hsm: Add hsm_release feature.
Nov 1, 2013
560d7b4
staging/lustre/llite: extended attribute cache
Nov 1, 2013
c0cc09c
staging/lustre/lnet: Add LNet Router Priority parameter
Nov 1, 2013
ea3dbe5
staging/lustre/api: HSM import uses new released pattern
lafoucriere Nov 1, 2013
da50da6
staging/lustre/target: move OUT to the unified target code
Nov 1, 2013
1de47d4
staging/lustre/seq: unified SEQ handler
Nov 1, 2013
eb784b9
staging/lustre/llite: remove ll_d_root_ops
Nov 1, 2013
5a6e624
staging/lustre/llite: pass correct pointer to obd_iocontrol()
jhammond-intel Nov 1, 2013
fbcd96f
staging/lustre/idl: remove LASSERT/CLASSERT from lustre_idl.h
adilger Nov 1, 2013
e0307f2
staging/lustre/mgs: set_param -P option that sets value permanently
Nov 1, 2013
0a57a48
staging/lustre/utils: HSM Posix CopyTool
lafoucriere Nov 1, 2013
c7ea3a2
staging/lustre/ptlrpc: flock deadlock detection does not work
Nov 1, 2013
5066309
staging/lustre/mdt: HSM coordinator main thread
lafoucriere Nov 5, 2013
3dce0c9
staging/lustre/dt: Fix assertion of method in dt_capa_get()
LiXi-storage Nov 5, 2013
777998a
staging/lustre/mdt: Set HSM dirty open-for-write file when evicted.
Nov 5, 2013
3d962b8
staging/lustre/mdt: a new param to allocate sequences
Nov 5, 2013
844d10d
staging/lustre/llite: Fix for oops in vvp_pgcache_show()
Nov 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion drivers/staging/lustre/include/linux/libcfs/curproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ int cfs_curproc_groups_nr(void);
*/

/* check if task is running in compat mode.*/
int current_is_32bit(void);
#define current_pid() (current->pid)
#define current_comm() (current->comm)
int cfs_get_environ(const char *key, char *value, int *val_len);
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/lustre/include/linux/libcfs/libcfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ static inline void *__container_of(void *ptr, unsigned long shift)
#define container_of0(ptr, type, member) \
((type *)__container_of((void *)(ptr), offsetof(type, member)))

#define SET_BUT_UNUSED(a) do { } while(sizeof(a) - sizeof(a))

#define _LIBCFS_H

#endif /* _LIBCFS_H */
1 change: 1 addition & 0 deletions drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct libcfs_ioctl_data {
char ioc_bulk[0];
};

#define ioc_priority ioc_u32[0]

struct libcfs_ioctl_hdr {
__u32 ioc_len;
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/lustre/include/linux/lnet/lib-lnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,13 @@ extern lnet_ni_t *lnet_net2ni(__u32 net);

int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, cfs_time_t when);
void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when);
int lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway_nid);
int lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway_nid,
unsigned int priority);
int lnet_check_routes(void);
int lnet_del_route(__u32 net, lnet_nid_t gw_nid);
void lnet_destroy_routes(void);
int lnet_get_route(int idx, __u32 *net, __u32 *hops,
lnet_nid_t *gateway, __u32 *alive);
lnet_nid_t *gateway, __u32 *alive, __u32 *priority);
void lnet_proc_init(void);
void lnet_proc_fini(void);
int lnet_rtrpools_alloc(int im_a_router);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/include/linux/lnet/lib-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ typedef struct lnet_peer {
lnet_rc_data_t *lp_rcd; /* router checker state */
} lnet_peer_t;


/* peer hash size */
#define LNET_PEER_HASH_BITS 9
#define LNET_PEER_HASH_SIZE (1 << LNET_PEER_HASH_BITS)
Expand All @@ -504,6 +503,7 @@ typedef struct {
int lr_seq; /* sequence for round-robin */
unsigned int lr_downis; /* number of down NIs */
unsigned int lr_hops; /* how far I am */
unsigned int lr_priority; /* route priority */
} lnet_route_t;

#define LNET_REMOTE_NETS_HASH_DEFAULT (1U << 7)
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/lustre/lnet/lnet/api-ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ LNetCtl(unsigned int cmd, void *arg)

case IOC_LIBCFS_ADD_ROUTE:
rc = lnet_add_route(data->ioc_net, data->ioc_count,
data->ioc_nid);
data->ioc_nid, data->ioc_priority);
return (rc != 0) ? rc : lnet_check_routes();

case IOC_LIBCFS_DEL_ROUTE:
Expand All @@ -1445,7 +1445,8 @@ LNetCtl(unsigned int cmd, void *arg)
case IOC_LIBCFS_GET_ROUTE:
return lnet_get_route(data->ioc_count,
&data->ioc_net, &data->ioc_count,
&data->ioc_nid, &data->ioc_flags);
&data->ioc_nid, &data->ioc_flags,
&data->ioc_priority);
case IOC_LIBCFS_NOTIFY_ROUTER:
return lnet_notify(NULL, data->ioc_nid, data->ioc_flags,
cfs_time_current() -
Expand Down
39 changes: 38 additions & 1 deletion drivers/staging/lustre/lnet/lnet/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,37 @@ lnet_parse_hops(char *str, unsigned int *hops)
*hops > 0 && *hops < 256);
}

#define LNET_PRIORITY_SEPARATOR (':')

int
lnet_parse_priority(char *str, unsigned int *priority, char **token)
{
int nob;
char *sep;
int len;

sep = strchr(str, LNET_PRIORITY_SEPARATOR);
if (sep == NULL) {
*priority = 0;
return 0;
}
len = strlen(sep + 1);

if ((sscanf((sep+1), "%u%n", priority, &nob) < 1) || (len != nob)) {
/* Update the caller's token pointer so it treats the found
priority as the token to report in the error message. */
*token += sep - str + 1;
return -1;
}

CDEBUG(D_NET, "gateway %s, priority %d, nob %d\n", str, *priority, nob);

/*
* Change priority separator to \0 to be able to parse NID
*/
*sep = '\0';
return 0;
}

int
lnet_parse_route(char *str, int *im_a_router)
Expand All @@ -624,6 +655,7 @@ lnet_parse_route(char *str, int *im_a_router)
int myrc = -1;
unsigned int hops;
int got_hops = 0;
unsigned int priority = 0;

INIT_LIST_HEAD(&gateways);
INIT_LIST_HEAD(&nets);
Expand Down Expand Up @@ -691,6 +723,11 @@ lnet_parse_route(char *str, int *im_a_router)
LNET_NETTYP(net) == LOLND)
goto token_error;
} else {
rc = lnet_parse_priority(ltb->ltb_text,
&priority, &token);
if (rc < 0)
goto token_error;

nid = libcfs_str2nid(ltb->ltb_text);
if (nid == LNET_NID_ANY ||
LNET_NETTYP(LNET_NIDNET(nid)) == LOLND)
Expand Down Expand Up @@ -720,7 +757,7 @@ lnet_parse_route(char *str, int *im_a_router)
continue;
}

rc = lnet_add_route(net, hops, nid);
rc = lnet_add_route(net, hops, nid, priority);
if (rc != 0) {
CERROR("Can't create route to %s via %s\n",
libcfs_net2str(net),
Expand Down
6 changes: 6 additions & 0 deletions drivers/staging/lustre/lnet/lnet/lib-move.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,12 @@ lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2)
lnet_peer_t *p1 = r1->lr_gateway;
lnet_peer_t *p2 = r2->lr_gateway;

if (r1->lr_priority < r2->lr_priority)
return 1;

if (r1->lr_priority > r2->lr_priority)
return -1;

if (r1->lr_hops < r2->lr_hops)
return 1;

Expand Down
19 changes: 11 additions & 8 deletions drivers/staging/lustre/lnet/lnet/router.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ lnet_add_route_to_rnet (lnet_remotenet_t *rnet, lnet_route_t *route)
}

int
lnet_add_route (__u32 net, unsigned int hops, lnet_nid_t gateway)
lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway,
unsigned int priority)
{
struct list_head *e;
lnet_remotenet_t *rnet;
Expand All @@ -311,8 +312,8 @@ lnet_add_route (__u32 net, unsigned int hops, lnet_nid_t gateway)
int add_route;
int rc;

CDEBUG(D_NET, "Add route: net %s hops %u gw %s\n",
libcfs_net2str(net), hops, libcfs_nid2str(gateway));
CDEBUG(D_NET, "Add route: net %s hops %u priority %u gw %s\n",
libcfs_net2str(net), hops, priority, libcfs_nid2str(gateway));

if (gateway == LNET_NID_ANY ||
LNET_NETTYP(LNET_NIDNET(gateway)) == LOLND ||
Expand Down Expand Up @@ -342,6 +343,7 @@ lnet_add_route (__u32 net, unsigned int hops, lnet_nid_t gateway)
rnet->lrn_net = net;
route->lr_hops = hops;
route->lr_net = net;
route->lr_priority = priority;

lnet_net_lock(LNET_LOCK_EX);

Expand Down Expand Up @@ -552,7 +554,7 @@ lnet_destroy_routes (void)

int
lnet_get_route(int idx, __u32 *net, __u32 *hops,
lnet_nid_t *gateway, __u32 *alive)
lnet_nid_t *gateway, __u32 *alive, __u32 *priority)
{
struct list_head *e1;
struct list_head *e2;
Expand All @@ -574,10 +576,11 @@ lnet_get_route(int idx, __u32 *net, __u32 *hops,
lr_list);

if (idx-- == 0) {
*net = rnet->lrn_net;
*hops = route->lr_hops;
*gateway = route->lr_gateway->lp_nid;
*alive = route->lr_gateway->lp_alive;
*net = rnet->lrn_net;
*hops = route->lr_hops;
*priority = route->lr_priority;
*gateway = route->lr_gateway->lp_nid;
*alive = route->lr_gateway->lp_alive;
lnet_net_unlock(cpt);
return 0;
}
Expand Down
16 changes: 9 additions & 7 deletions drivers/staging/lustre/lnet/lnet/router_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ int LL_PROC_PROTO(proc_lnet_routes)
the_lnet.ln_routing ? "enabled" : "disabled");
LASSERT(tmpstr + tmpsiz - s > 0);

s += snprintf(s, tmpstr + tmpsiz - s, "%-8s %4s %7s %s\n",
"net", "hops", "state", "router");
s += snprintf(s, tmpstr + tmpsiz - s, "%-8s %4s %8s %7s %s\n",
"net", "hops", "priority", "state", "router");
LASSERT(tmpstr + tmpsiz - s > 0);

lnet_net_lock(0);
Expand Down Expand Up @@ -229,14 +229,16 @@ int LL_PROC_PROTO(proc_lnet_routes)
}

if (route != NULL) {
__u32 net = rnet->lrn_net;
unsigned int hops = route->lr_hops;
lnet_nid_t nid = route->lr_gateway->lp_nid;
int alive = route->lr_gateway->lp_alive;
__u32 net = rnet->lrn_net;
unsigned int hops = route->lr_hops;
unsigned int priority = route->lr_priority;
lnet_nid_t nid = route->lr_gateway->lp_nid;
int alive = route->lr_gateway->lp_alive;

s += snprintf(s, tmpstr + tmpsiz - s,
"%-8s %4u %7s %s\n",
"%-8s %4u %8u %7s %s\n",
libcfs_net2str(net), hops,
priority,
alive ? "up" : "down",
libcfs_nid2str(nid));
LASSERT(tmpstr + tmpsiz - s > 0);
Expand Down
56 changes: 27 additions & 29 deletions drivers/staging/lustre/lnet/selftest/conctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,12 +723,12 @@ lst_stat_query_ioctl(lstio_stat_args_t *args)

int lst_test_add_ioctl(lstio_test_args_t *args)
{
char *name;
char *srcgrp = NULL;
char *dstgrp = NULL;
void *param = NULL;
int ret = 0;
int rc = -ENOMEM;
char *batch_name;
char *src_name = NULL;
char *dst_name = NULL;
void *param = NULL;
int ret = 0;
int rc = -ENOMEM;

if (args->lstio_tes_resultp == NULL ||
args->lstio_tes_retp == NULL ||
Expand All @@ -755,16 +755,16 @@ int lst_test_add_ioctl(lstio_test_args_t *args)
args->lstio_tes_param_len > PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
return -EINVAL;

LIBCFS_ALLOC(name, args->lstio_tes_bat_nmlen + 1);
if (name == NULL)
LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);
if (batch_name == NULL)
return rc;

LIBCFS_ALLOC(srcgrp, args->lstio_tes_sgrp_nmlen + 1);
if (srcgrp == NULL)
LIBCFS_ALLOC(src_name, args->lstio_tes_sgrp_nmlen + 1);
if (src_name == NULL)
goto out;

LIBCFS_ALLOC(dstgrp, args->lstio_tes_dgrp_nmlen + 1);
if (dstgrp == NULL)
LIBCFS_ALLOC(dst_name, args->lstio_tes_dgrp_nmlen + 1);
if (dst_name == NULL)
goto out;

if (args->lstio_tes_param != NULL) {
Expand All @@ -774,39 +774,37 @@ int lst_test_add_ioctl(lstio_test_args_t *args)
}

rc = -EFAULT;
if (copy_from_user(name,
args->lstio_tes_bat_name,
args->lstio_tes_bat_nmlen) ||
copy_from_user(srcgrp,
args->lstio_tes_sgrp_name,
args->lstio_tes_sgrp_nmlen) ||
copy_from_user(dstgrp,
args->lstio_tes_dgrp_name,
args->lstio_tes_dgrp_nmlen) ||
if (copy_from_user(batch_name, args->lstio_tes_bat_name,
args->lstio_tes_bat_nmlen) ||
copy_from_user(src_name, args->lstio_tes_sgrp_name,
args->lstio_tes_sgrp_nmlen) ||
copy_from_user(dst_name, args->lstio_tes_dgrp_name,
args->lstio_tes_dgrp_nmlen) ||
copy_from_user(param, args->lstio_tes_param,
args->lstio_tes_param_len))
goto out;

rc = lstcon_test_add(name,
rc = lstcon_test_add(batch_name,
args->lstio_tes_type,
args->lstio_tes_loop,
args->lstio_tes_concur,
args->lstio_tes_dist, args->lstio_tes_span,
srcgrp, dstgrp, param, args->lstio_tes_param_len,
src_name, dst_name, param,
args->lstio_tes_param_len,
&ret, args->lstio_tes_resultp);

if (ret != 0)
rc = (copy_to_user(args->lstio_tes_retp, &ret,
sizeof(ret))) ? -EFAULT : 0;
out:
if (name != NULL)
LIBCFS_FREE(name, args->lstio_tes_bat_nmlen + 1);
if (batch_name != NULL)
LIBCFS_FREE(batch_name, args->lstio_tes_bat_nmlen + 1);

if (srcgrp != NULL)
LIBCFS_FREE(srcgrp, args->lstio_tes_sgrp_nmlen + 1);
if (src_name != NULL)
LIBCFS_FREE(src_name, args->lstio_tes_sgrp_nmlen + 1);

if (dstgrp != NULL)
LIBCFS_FREE(dstgrp, args->lstio_tes_dgrp_nmlen + 1);
if (dst_name != NULL)
LIBCFS_FREE(dst_name, args->lstio_tes_dgrp_nmlen + 1);

if (param != NULL)
LIBCFS_FREE(param, args->lstio_tes_param_len);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/selftest/conrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ lstcon_rpc_trans_abort(lstcon_rpc_trans_t *trans, int error)

sfw_abort_rpc(rpc);

if (error != ETIMEDOUT)
if (error != -ETIMEDOUT)
continue;

nd = crpc->crp_node;
Expand Down
Loading