From 9dc4a82c08e3928d6a9305c645643772ecc2ffb9 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 11 Sep 2002 22:08:40 +0000 Subject: [PATCH] Use OBD_PUNCH_EOF constant instead of lots of f's. --- lustre/llite/rw.c | 10 +++++----- lustre/obdfilter/filter.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index f3949ec..d979b25 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -213,8 +213,8 @@ static int ll_commit_write(struct file *file, struct page *page, if (!PageLocked(page)) LBUG(); - CDEBUG(D_INODE, "commit_page writing (at %d) to %d, count %Ld\n", - from, to, (unsigned long long)pg.count); + CDEBUG(D_INODE, "commit_page writing (off "LPD64"), count %ld\n", + pg.off, pg.count); err = obd_brw(OBD_BRW_WRITE, ll_i2obdconn(inode), md, 1, &pg, ll_sync_io_cb, cbd); @@ -245,8 +245,8 @@ void ll_truncate(struct inode *inode) oa.o_id = md->lmd_object_id; oa.o_size = inode->i_size; - CDEBUG(D_INFO, "calling punch for %ld (all bytes after %Ld)\n", - (long)oa.o_id, (unsigned long long)oa.o_size); + CDEBUG(D_INFO, "calling punch for "LPX64" (all bytes after "LPD64")\n", + oa.o_id, oa.o_size); err = ll_size_lock(inode, md, oa.o_size, LCK_PW, &lockhs); if (err) { @@ -259,7 +259,7 @@ void ll_truncate(struct inode *inode) /* truncate == punch to/from start from/to end: set end to -1 for that. */ err = obd_punch(ll_i2obdconn(inode), &oa, md, inode->i_size, - 0xffffffffffffffff); + OBD_PUNCH_EOF); if (err) CERROR("obd_truncate fails (%d)\n", err); else diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 7b260d5..b66fe60 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -700,10 +700,10 @@ static int filter_truncate(struct lustre_handle *conn, struct obdo *oa, int error; ENTRY; - if (end != 0xffffffffffffffff) + if (end != OBD_PUNCH_EOF) CERROR("PUNCH not supported, only truncate works\n"); - CDEBUG(D_INODE, "calling truncate for object #"LPD64", valid = %x, " + CDEBUG(D_INODE, "calling truncate for object "LPX64", valid = %x, " "o_size = "LPD64"\n", oa->o_id, oa->o_valid, start); oa->o_size = start; error = filter_setattr(conn, oa, NULL); -- 1.8.3.1