From ef3d7e17c9baf0ee6af8e3dceff95a0fdb7af75e Mon Sep 17 00:00:00 2001 From: braam Date: Wed, 21 Aug 2002 03:41:13 +0000 Subject: [PATCH] - In ordinary writes (not O_DIRECT) do not round the data object file size to a page boundary. Objects are now as long as they should be. --- lustre/obdfilter/filter.c | 4 ++-- lustre/ost/ost_handler.c | 2 +- lustre/tests/local.sh | 15 ++++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index c823a65..26a1b11 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1179,7 +1179,7 @@ static int filter_preprw(int cmd, struct lustre_handle *conn, r->addr = page_address(page); r->offset = b->offset; r->page = page; - r->len = PAGE_SIZE; + r->len = b->len; } } @@ -1285,7 +1285,7 @@ static int filter_commitrw(int cmd, struct lustre_handle *conn, if (cmd & OBD_BRW_WRITE) { int err = filter_commit_write(page, 0, - PAGE_SIZE, 0); + r->len, 0); if (!rc) rc = err; diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index b82912d..33615ad 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -382,7 +382,7 @@ static int ost_brw_write(struct ptlrpc_request *req) bulk->b_page = lnb->page; bulk->b_flags = lnb->flags; bulk->b_dentry = lnb->dentry; - bulk->b_buflen = PAGE_SIZE; + bulk->b_buflen = lnb->len; bulk->b_cb = NULL; /* this advances remote_nb */ diff --git a/lustre/tests/local.sh b/lustre/tests/local.sh index 242bdf6..26075a1 100755 --- a/lustre/tests/local.sh +++ b/lustre/tests/local.sh @@ -1,16 +1,21 @@ #!/bin/bash -config=local.xml +config=uml.xml LMC=../utils/lmc +echo "FIXME: autoformat is no by default, edit $config to change" + # create nodes -${LMC} -o $config --node localhost --net uml1 tcp +${LMC} -o $config --node localhost --net localhost tcp # configure mds server -${LMC} -m $config --format --node localhost --mds mds1 /tmp/mds1 50000 +${LMC} -m $config --node localhost --mds mds1 /tmp/mds1 50000 # configure ost -${LMC} -m $config --format --node localhost --ost /tmp/ost1 100000 +${LMC} -m $config --node localhost --ost /tmp/ost1 100000 +# is this needed? +# ${LMC} -m $config --node localhost --mdc MDC_mds1 # create client config -${LMC} -m $config --node localhost --mtpt /mnt/lustre mds1 OSC_localhost +${LMC} -m $config --node localhost --mtpt /mnt/lustre mds1 ost1 + -- 1.8.3.1