From 01f515d0632ecdc11fb54f46bd823fa33fb4ed3e Mon Sep 17 00:00:00 2001 From: nikita Date: Sun, 9 Oct 2005 20:32:40 +0000 Subject: [PATCH] Fix wrong assertion added to ldlm_cli_enqueue() by patch from bug 7311. Also fix few outdated references in comments. b=7311 r=adilger --- lustre/ldlm/ldlm_request.c | 6 +++--- lustre/liblustre/file.c | 4 ++-- lustre/liblustre/super.c | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 4d8f98e..49038e2 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -422,11 +422,11 @@ int ldlm_cli_enqueue(struct obd_export *exp, /* * Liblustre client doesn't get extent locks, except for O_APPEND case - * where [0, OBD_OBJECT_EOF] lock is taken. + * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where + * [i_size, OBD_OBJECT_EOF] lock is taken. */ LASSERT(ergo(LIBLUSTRE_CLIENT, type != LDLM_EXTENT || - (policy->l_extent.start == 0 && - policy->l_extent.end == OBD_OBJECT_EOF))); + policy->l_extent.end == OBD_OBJECT_EOF)); reply = lustre_swab_repbuf(req, 0, sizeof(*reply), lustre_swab_ldlm_reply); diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 9b387ff..04d0894 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -415,8 +415,8 @@ _SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off) RETURN(off); } -/* this isn't where truncate starts. roughly: - * sys_truncate->ll_setattr_raw->vmtruncate->ll_truncate +/* this isn't where truncate starts. roughly: + * llu_iop_{open,setattr}->llu_setattr_raw->llu_vmtruncate->llu_truncate * we grab the lock back in setattr_raw to avoid races. */ static void llu_truncate(struct inode *inode) { diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index f32d98e..f32aa36 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -718,7 +718,8 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr) } } - /* Won't invoke vmtruncate, as we already cleared ATTR_SIZE */ + /* Won't invoke llu_vmtruncate(), as we already cleared + * ATTR_SIZE */ inode_setattr(inode, attr); } -- 1.8.3.1