shadow@clusterfs.com
2007-Mar-22 23:18 UTC
[Lustre-devel] [Bug 11710] use PG_writeback in lustre
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=11710 (In reply to comment #20)> > Please explain, why you add llap_writeback member and don`t use > > PageWriteback()instead of. How i see this duplicate PG_writeback > > bit, but i don`t see case when his value is different to > > PageWriteback(). > > First off thanks for the quick review Alexey. This was just a first > cut at a new patch. > > Your right llap_writeback is always set the same as PageWriteback(). > The only reason I did this initially was I was not 100% sure that > the PG_writeback bit was never modified by the VFS. By introducing > llap_writeback in lustre I could just easily detect if they got out > of sync and assert(). That all said I''ve pretty much convinced myself > that''s impossible so I have no objection to dropping that and trusting > the PG_writeback bit. >Quick review contens in fs/ and mm/ show only two places when PG_writeback can be cleared by kernel. One - in swap io, one in generic writepage. seems use PageWriteback(page) should be safe.> > Also you can simplify code in ll_ap_make_ready - if we double call > > set_page_writeback for page - it`s not produce error. Same for > > ''ll_writepage''. > > Yup, I think I can do something to simply this all. > > On a related note, do you have any ideas on how to best handle clearing > the error code for the file in the presense of recoverable errors. I''d > really like fsync() to return success if it was able to eventually write > out all the pages. Perhaps instead of a error flags being maintained > a counter could be used instead... I''m still not sure what the right > thing to do here is. >I will be work on this.