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
Updated parameters for obdfs_writepage() to use struct *dentry instead of
[fs/lustre-release.git]
/
lustre
/
obdclass
/
genops.c
diff --git
a/lustre/obdclass/genops.c
b/lustre/obdclass/genops.c
index
06992c1
..
929dc88
100644
(file)
--- a/
lustre/obdclass/genops.c
+++ b/
lustre/obdclass/genops.c
@@
-202,19
+202,19
@@
void lck_page(struct page *page)
int gen_copy_data(struct obd_conn *conn, obdattr *src, obdattr *tgt)
{
struct page *page;
int gen_copy_data(struct obd_conn *conn, obdattr *src, obdattr *tgt)
{
struct page *page;
- unsigned long
offset
= 0;
+ unsigned long
index
= 0;
int rc;
int rc;
- page =
__get_pages(GFP_USER, 0
);
+ page =
alloc_page(GFP_USER
);
if ( !page )
return -ENOMEM;
lck_page(page);
if ( !page )
return -ENOMEM;
lck_page(page);
- while (
offset < src->i_size
) {
+ while (
index < ((src->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT)
) {
- page->
offset = offset
;
+ page->
index = index
;
rc = OBP(conn->oc_dev, brw)(READ, conn, src, page, 0);
if ( rc != PAGE_SIZE )
rc = OBP(conn->oc_dev, brw)(READ, conn, src, page, 0);
if ( rc != PAGE_SIZE )
@@
-224,7
+224,7
@@
int gen_copy_data(struct obd_conn *conn, obdattr *src, obdattr *tgt)
if ( rc != PAGE_SIZE)
break;
if ( rc != PAGE_SIZE)
break;
-
offset += rc
;
+
index ++
;
}
tgt->i_size = src->i_size;
tgt->i_blocks = src->i_blocks;
}
tgt->i_size = src->i_size;
tgt->i_blocks = src->i_blocks;