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
LU-3906 tests: fix space estimation codes in run_compilebench()
[fs/lustre-release.git]
/
lustre
/
osd-zfs
/
osd_io.c
diff --git
a/lustre/osd-zfs/osd_io.c
b/lustre/osd-zfs/osd_io.c
index
e315fc1
..
c041c8e
100644
(file)
--- a/
lustre/osd-zfs/osd_io.c
+++ b/
lustre/osd-zfs/osd_io.c
@@
-41,14
+41,10
@@
* Author: Mike Pershin <tappro@whamcloud.com>
*/
* Author: Mike Pershin <tappro@whamcloud.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_OSD
#include <lustre_ver.h>
#include <libcfs/libcfs.h>
#define DEBUG_SUBSYSTEM S_OSD
#include <lustre_ver.h>
#include <libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
#include <obd_support.h>
#include <lustre_net.h>
#include <obd.h>
#include <obd_support.h>
#include <lustre_net.h>
#include <obd.h>
@@
-242,16
+238,12
@@
static int osd_bufs_put(const struct lu_env *env, struct dt_object *dt,
return 0;
}
return 0;
}
-static struct page *kmem_to_page(void *addr)
+static
inline
struct page *kmem_to_page(void *addr)
{
{
- struct page *page;
-
- if (kmem_virt(addr))
- page = vmalloc_to_page(addr);
+ if (is_vmalloc_addr(addr))
+ return vmalloc_to_page(addr);
else
else
- page = virt_to_page(addr);
-
- return page;
+ return virt_to_page(addr);
}
static int osd_bufs_get_read(const struct lu_env *env, struct osd_object *obj,
}
static int osd_bufs_get_read(const struct lu_env *env, struct osd_object *obj,
@@
-292,8
+284,8
@@
static int osd_bufs_get_read(const struct lu_env *env, struct osd_object *obj,
dbf = (void *) ((unsigned long)dbp[i] | 1);
while (tocpy > 0) {
dbf = (void *) ((unsigned long)dbp[i] | 1);
while (tocpy > 0) {
- thispage =
CFS_PAG
E_SIZE;
- thispage -= bufoff & (
CFS_PAG
E_SIZE - 1);
+ thispage =
PAGE_CACH
E_SIZE;
+ thispage -= bufoff & (
PAGE_CACH
E_SIZE - 1);
thispage = min(tocpy, thispage);
lnb->rc = 0;
thispage = min(tocpy, thispage);
lnb->rc = 0;
@@
-366,7
+358,7
@@
static int osd_bufs_get_write(const struct lu_env *env, struct osd_object *obj,
/* go over pages arcbuf contains, put them as
* local niobufs for ptlrpc's bulks */
while (sz_in_block > 0) {
/* go over pages arcbuf contains, put them as
* local niobufs for ptlrpc's bulks */
while (sz_in_block > 0) {
- plen = min_t(int, sz_in_block,
CFS_PAG
E_SIZE);
+ plen = min_t(int, sz_in_block,
PAGE_CACH
E_SIZE);
lnb[i].lnb_file_offset = off;
lnb[i].lnb_page_offset = 0;
lnb[i].lnb_file_offset = off;
lnb[i].lnb_page_offset = 0;
@@
-400,7
+392,7
@@
static int osd_bufs_get_write(const struct lu_env *env, struct osd_object *obj,
/* can't use zerocopy, allocate temp. buffers */
while (sz_in_block > 0) {
/* can't use zerocopy, allocate temp. buffers */
while (sz_in_block > 0) {
- plen = min_t(int, sz_in_block,
CFS_PAG
E_SIZE);
+ plen = min_t(int, sz_in_block,
PAGE_CACH
E_SIZE);
lnb[i].lnb_file_offset = off;
lnb[i].lnb_page_offset = 0;
lnb[i].lnb_file_offset = off;
lnb[i].lnb_page_offset = 0;