<div dir="ltr">Hi,<div><br></div><div>the code assumption is that the underlying device has no volatile write cache, i was absolute sure we have that somewhere in the FAQ, but i couldn&#39;t find it, so i will talk to somebody to correct this. </div><div>if i understand <a href="https://www.kernel.org/doc/Documentation/block/writeback_cache_control.txt">https://www.kernel.org/doc/Documentation/block/writeback_cache_control.txt</a> correct one could enforce this by setting <span style="white-space:pre-wrap">REQ_FUA, but thats not explicitly set today, at least i can&#39;t see it. i will discuss this with one of our devs who owns this code and come back. </span><br></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">sven</span></div><div><span style="white-space:pre-wrap"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 7, 2017 at 8:05 PM Aaron Knister &lt;<a href="mailto:aaron.s.knister@nasa.gov">aaron.s.knister@nasa.gov</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Sven. I didn&#39;t think GPFS itself was caching anything on that<br>
layer, but it&#39;s my understanding that O_DIRECT isn&#39;t sufficient to force<br>
I/O to be flushed (e.g. the device itself might have a volatile caching<br>
layer). Take someone using ZFS zvol&#39;s as NSDs. I can write() all day log<br>
to that zvol (even with O_DIRECT) but there is absolutely no guarantee<br>
those writes have been committed to stable storage and aren&#39;t just<br>
sitting in RAM until an fsync() occurs (or some other bio function that<br>
causes a flush). I also don&#39;t believe writing to a SATA drive with<br>
O_DIRECT will force cache flushes of the drive&#39;s writeback cache..<br>
although I just tested that one and it seems to actually trigger a scsi<br>
cache sync. Interesting.<br>
<br>
-Aaron<br>
<br>
On 9/7/17 10:55 PM, Sven Oehme wrote:<br>
&gt; I am not sure what exactly you are looking for but all blockdevices are<br>
&gt; opened with O_DIRECT , we never cache anything on this layer .<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Sep 7, 2017, 7:11 PM Aaron Knister &lt;<a href="mailto:aaron.s.knister@nasa.gov" target="_blank">aaron.s.knister@nasa.gov</a><br>
&gt; &lt;mailto:<a href="mailto:aaron.s.knister@nasa.gov" target="_blank">aaron.s.knister@nasa.gov</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi Everyone,<br>
&gt;<br>
&gt;     This is something that&#39;s come up in the past and has recently resurfaced<br>
&gt;     with a project I&#39;ve been working on, and that is-- it seems to me as<br>
&gt;     though mmfsd never attempts to flush the cache of the block devices its<br>
&gt;     writing to (looking at blktrace output seems to confirm this). Is this<br>
&gt;     actually the case? I&#39;ve looked at the gpl headers for linux and I don&#39;t<br>
&gt;     see any sign of blkdev_fsync, blkdev_issue_flush, WRITE_FLUSH, or<br>
&gt;     REQ_FLUSH. I&#39;m sure there&#39;s other ways to trigger this behavior that<br>
&gt;     GPFS may very well be using that I&#39;ve missed. That&#39;s why I&#39;m asking :)<br>
&gt;<br>
&gt;     I figure with FPO being pushed as an HDFS replacement using commodity<br>
&gt;     drives this feature has *got* to be in the code somewhere.<br>
&gt;<br>
&gt;     -Aaron<br>
&gt;<br>
&gt;     --<br>
&gt;     Aaron Knister<br>
&gt;     NASA Center for Climate Simulation (Code 606.2)<br>
&gt;     Goddard Space Flight Center<br>
&gt;     <a href="tel:(301)%20286-2776" value="+13012862776" target="_blank">(301) 286-2776</a><br>
&gt;     _______________________________________________<br>
&gt;     gpfsug-discuss mailing list<br>
&gt;     gpfsug-discuss at <a href="http://spectrumscale.org" rel="noreferrer" target="_blank">spectrumscale.org</a> &lt;<a href="http://spectrumscale.org" rel="noreferrer" target="_blank">http://spectrumscale.org</a>&gt;<br>
&gt;     <a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gpfsug-discuss mailing list<br>
&gt; gpfsug-discuss at <a href="http://spectrumscale.org" rel="noreferrer" target="_blank">spectrumscale.org</a><br>
&gt; <a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a><br>
&gt;<br>
<br>
--<br>
Aaron Knister<br>
NASA Center for Climate Simulation (Code 606.2)<br>
Goddard Space Flight Center<br>
<a href="tel:(301)%20286-2776" value="+13012862776" target="_blank">(301) 286-2776</a><br>
_______________________________________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at <a href="http://spectrumscale.org" rel="noreferrer" target="_blank">spectrumscale.org</a><br>
<a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a><br>
</blockquote></div>