From bdd161755db65e1e7382ac4f22df9f574c1ed52c Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 1 Aug 2003 09:04:28 +0000 Subject: [PATCH] Fix for bug 1609 on CVS HEAD. --- lustre/llite/rw.c | 5 +++-- lustre/obdfilter/filter_io.c | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index b4004b5..e5890bf 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -678,8 +678,9 @@ static int ll_direct_IO(int rw, struct inode *inode, struct kiobuf *iobuf, if (!lsm || !lsm->lsm_object_id) RETURN(-EBADF); - if ((iobuf->offset & (blocksize - 1)) || - (iobuf->length & (blocksize - 1))) + /* FIXME: io smaller than PAGE_SIZE is broken on ia64 */ + if ((iobuf->offset & (PAGE_SIZE - 1)) || + (iobuf->length & (PAGE_SIZE - 1))) RETURN(-EINVAL); set = ptlrpc_prep_set(); diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 1526295..0885a80 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -202,11 +202,10 @@ int filter_get_page_write(struct inode *inode, struct niobuf_local *lnb, lnb->page = page; lnb->flags |= N_LOCAL_TEMP_PAGE; } else if (!IS_ERR(page)) { + unsigned from = lnb->offset & ~PAGE_MASK, to = from + lnb->len; (*pglocked)++; - rc = mapping->a_ops->prepare_write(NULL, page, - lnb->offset & ~PAGE_MASK, - lnb->len); + rc = mapping->a_ops->prepare_write(NULL, page, from, to); if (rc) { if (rc != -ENOSPC) CERROR("page index %lu, rc = %d\n", index, rc); -- 1.8.3.1