From: alex Date: Sun, 28 Aug 2005 13:16:48 +0000 (+0000) Subject: - set and check io epoch only for writtable files X-Git-Tag: 1.4.10~633 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ef1de0f1f611571db8e7e2ff3d621403cd58cc74;p=fs%2Flustre-release.git - set and check io epoch only for writtable files --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index aa71245..c6a7058 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -354,10 +354,12 @@ int ll_och_fill(struct inode *inode, struct lookup_intent *it, memcpy(&och->och_fh, &body->handle, sizeof(body->handle)); och->och_magic = OBD_CLIENT_HANDLE_MAGIC; - if (lli->lli_io_epoch != 0 && lli->lli_io_epoch != body->io_epoch) - CDEBUG(D_ERROR, "are we opening new epoch?! "LPD64 - " != "LPD64"\n", lli->lli_io_epoch, body->io_epoch); - lli->lli_io_epoch = body->io_epoch; + if (it->it_flags & FMODE_WRITE) { + if (lli->lli_io_epoch && lli->lli_io_epoch != body->io_epoch) + CDEBUG(D_ERROR, "new epoch?! "LPD64" != "LPD64"\n", + lli->lli_io_epoch, body->io_epoch); + lli->lli_io_epoch = body->io_epoch; + } mdc_set_open_replay_data(ll_i2mdexp(inode), och, LUSTRE_IT(it)->it_data);