From: tianzy Date: Mon, 28 Jul 2008 04:53:53 +0000 (+0000) Subject: Branch b1_8 X-Git-Tag: v1_7_110~2^237~1 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e19edf0fd8acfc58cf1e9184428217c265221e73;p=fs%2Flustre-release.git Branch b1_8 Have O_DIRECT honor the quota b=16125 i=johann i=tom.wang --- diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index a8e6547..abb2344 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -697,10 +697,11 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, if (this_size > iattr.ia_size) iattr.ia_size = this_size; - /* if one page is a write-back page from client cache, or it's - * written by root, then mark the whole io request as ignore - * quota request */ - if (lnb->flags & (OBD_BRW_FROM_GRANT | OBD_BRW_NOQUOTA)) + /* if one page is a write-back page from client cache and + * not from direct_io, or it's written by root, then mark + * the whole io request as ignore quota request */ + if (lnb->flags & OBD_BRW_NOQUOTA || + (lnb->flags & (OBD_BRW_FROM_GRANT | OBD_BRW_SYNC)) == OBD_BRW_FROM_GRANT) iobuf->dr_ignore_quota = 1; }