<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Andreas,</div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">I'd like to reserve a new
</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt;"><code>OBD_CONNECT2</code></span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
 bit for an upcoming feature (currently drafted as </span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt;"><code>OBD_CONNECT2_LAYOUT_REPLACED,
</code></span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><code style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;">maybe</code></span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt;"><code>&nbsp;</code></span><span style="font-family: monospace; font-size: 10pt;">0x400000000000ULL
 ?</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">).</span></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b><br>
</b></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>Feature</b></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);">
<span style="font-size: 12pt;">Please check <a href="https://jira.whamcloud.com/browse/LU-20211" target="_blank" id="OWA5e1e30d6-ab92-5f2f-6ab3-b224f17a6aa1" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn OWAAutoLink" title="https://jira.whamcloud.com/browse/lu-20211" rel="noreferrer noopener">
https://jira.whamcloud.com/browse/LU-20211</a>, on truncate(0), if the current file layout has unavailable/degraded stripes (e.g. OST marked degraded), the
</span><span style="font-size: 10pt;">MDS</span><span style="font-size: 12pt;"> may replace the layout (orphan +
</span><span style="font-size: 10pt;"><code>swap_layouts</code></span><span style="font-size: 12pt;">) so the client can continue with a usable layout. After a successful replace, the setattr reply returns the new
</span><span style="font-size: 10pt;">LOVEA</span><span style="font-size: 12pt;">.</span></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);">
<span style="font-size: 12pt;">The client must discard the old page/OSC cache during layout apply, instead of doing
</span><span style="font-size: 10pt;"><code>CL_FSYNC_LOCAL</code></span><span style="font-size: 12pt;"> writeback to the old (possibly degraded) stripes. Otherwise layout change fails with
</span><span style="font-size: 10pt;"><code>-EINVAL</code></span><span style="font-size: 12pt;">, while the
</span><span style="font-size: 10pt;">MDS</span><span style="font-size: 12pt;"> has already committed truncate + layout replace.</span></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b><br>
</b></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>Why a new connect flag is needed</b></div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);">
<span style="font-size: 12pt;">This behavior requires coordinated client/</span><span style="font-size: 10pt;">MDS</span><span style="font-size: 12pt;"> support:</span></div>
<ul>
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px;">
New <span style="font-size: 10pt;" role="presentation">MDS</span> + old client: if the
<span style="font-size: 10pt;" role="presentation">MDS</span> replaces the layout anyway, the old client still writebacks on layout change and can fail truncate with
<span style="font-size: 10pt;" role="presentation"><code>-EINVAL</code></span>, leaving server/client state inconsistent.</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px;">
<div class="elementToProof" role="presentation">With a connect flag, the <span style="font-size: 10pt;">
MDS</span> can skip layout replace unless the client advertised support, and the client knows to discard-prune.</div>
</li></ul>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div class="elementToProof" style="margin-top: 8px; margin-bottom: 8px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Keguang Xu</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>