Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "LU-1201 checksum: add libcfs crypto hash"
[fs/lustre-release.git]
/
lustre
/
ptlrpc
/
sec_bulk.c
diff --git
a/lustre/ptlrpc/sec_bulk.c
b/lustre/ptlrpc/sec_bulk.c
index
a727a9d
..
bfce3e1
100644
(file)
--- a/
lustre/ptlrpc/sec_bulk.c
+++ b/
lustre/ptlrpc/sec_bulk.c
@@
-1,6
+1,4
@@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-28,6
+26,8
@@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-38,9
+38,6
@@
* Author: Eric Mei <ericm@clusterfs.com>
*/
* Author: Eric Mei <ericm@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_SEC
#include <libcfs/libcfs.h>
#define DEBUG_SUBSYSTEM S_SEC
#include <libcfs/libcfs.h>
@@
-396,7
+393,7
@@
static void enc_pools_insert(cfs_page_t ***pools, int npools, int npages)
static int enc_pools_add_pages(int npages)
{
static int enc_pools_add_pages(int npages)
{
- static CFS_DE
CLARE_MUTEX(sem_add_pages
);
+ static CFS_DE
FINE_MUTEX(add_pages_mutex
);
cfs_page_t ***pools;
int npools, alloced = 0;
int i, j, rc = -ENOMEM;
cfs_page_t ***pools;
int npools, alloced = 0;
int i, j, rc = -ENOMEM;
@@
-404,7
+401,7
@@
static int enc_pools_add_pages(int npages)
if (npages < PTLRPC_MAX_BRW_PAGES)
npages = PTLRPC_MAX_BRW_PAGES;
if (npages < PTLRPC_MAX_BRW_PAGES)
npages = PTLRPC_MAX_BRW_PAGES;
- cfs_
down(&sem_add_pages
);
+ cfs_
mutex_lock(&add_pages_mutex
);
if (npages + page_pools.epp_total_pages > page_pools.epp_max_pages)
npages = page_pools.epp_max_pages - page_pools.epp_total_pages;
if (npages + page_pools.epp_total_pages > page_pools.epp_max_pages)
npages = page_pools.epp_max_pages - page_pools.epp_total_pages;
@@
-423,8
+420,8
@@
static int enc_pools_add_pages(int npages)
goto out_pools;
for (j = 0; j < PAGES_PER_POOL && alloced < npages; j++) {
goto out_pools;
for (j = 0; j < PAGES_PER_POOL && alloced < npages; j++) {
-
pools[i][j] = cfs_alloc_page(CFS_ALLOC_IO |
-
CFS_ALLOC_HIGH
);
+ pools[i][j] = cfs_alloc_page(CFS_ALLOC_IO |
+
CFS_ALLOC_HIGHMEM
);
if (pools[i][j] == NULL)
goto out_pools;
if (pools[i][j] == NULL)
goto out_pools;
@@
-446,7
+443,7
@@
out:
CERROR("Failed to allocate %d enc pages\n", npages);
}
CERROR("Failed to allocate %d enc pages\n", npages);
}
- cfs_
up(&sem_add_pages
);
+ cfs_
mutex_unlock(&add_pages_mutex
);
return rc;
}
return rc;
}