<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Microsoft YaHei UI";
        panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"PingFang TC";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"\@Microsoft YaHei UI";}
@font-face
        {font-family:"\@PingFang TC";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thanks for the pointer.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">> </span>
<span lang="EN-US">Similar to archive, when restore a directory, we should also use open flags O_IGNORE_IBITS_LOCK | O_IGNORE_EXTENT_LOCK to create files and resync data without taking any locks.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Based on this ticket I understand that your proposal is to add new flags to ignore parent directory locking when creating new files, right?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I thought about that approach but I was afraid this could be a bit painful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">This flag would have to be checked in a lot of different places in the code, probably not only open.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I wanted also to keep the possibility to create new files in a released directory without needing to restore it. Requiring the actual only really when calling readdir<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I was wondering if other thinks the best approach, maybe it is.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Aurélien<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b><span style="font-size:12.0pt;color:black">De :
</span></b><span style="font-size:12.0pt;color:black">Qian Yingjin <qian@ddn.com><br>
<b>Date : </b>jeudi 25 novembre 2021 à 15:33<br>
<b>À : </b>"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>, "Degremont, Aurelien" <degremoa@amazon.fr><br>
<b>Objet : </b>[EXTERNAL] </span><span style="font-size:12.0pt;font-family:"MS Gothic";color:black">回复</span><span style="font-size:12.0pt;color:black">: Recommendation for hsm_restore for directories<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="625" style="width:468.8pt;margin-left:35.4pt;border-collapse:collapse">
<tbody>
<tr style="height:15.25pt">
<td width="625" valign="top" style="width:468.8pt;border:solid #ED7D31 1.5pt;padding:0cm 5.4pt 0cm 5.4pt;height:15.25pt">
<p><strong><span style="font-family:"Calibri",sans-serif;color:black;background:#FFFF99">CAUTION</span></strong><span style="color:black;background:#FFFF99">: This email originated from outside of the organization. Do not click links or open attachments unless
 you can confirm the sender and know the content is safe.</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;color:black">Hi </span><span style="font-family:"Microsoft YaHei UI",sans-serif;color:black;background:white">Aurélien,</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-family:"Microsoft YaHei UI",sans-serif;color:black;background:white"><br>
<br>
</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-family:"Microsoft YaHei UI",sans-serif;color:black;background:white">There is a rough thought about it: <a href="https://jira.whamcloud.com/browse/LU-13024">https://jira.whamcloud.com/browse/LU-13024</a></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;font-family:"Segoe UI",sans-serif;color:#172B4D;letter-spacing:-.2pt;background:white">Lustre HSM support for a directory</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;font-family:"Segoe UI",sans-serif;color:#172B4D;letter-spacing:-.2pt;background:white"><br>
<br>
</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;font-family:"Segoe UI",sans-serif;color:#172B4D;letter-spacing:-.2pt;background:white">Regards,</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;font-family:"Segoe UI",sans-serif;color:#172B4D;letter-spacing:-.2pt;background:white">Qian</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="margin-left:35.4pt;text-align:center">
<hr size="0" width="94%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style="margin-left:35.4pt"><b><span style="font-family:"PingFang TC",sans-serif;color:black">发</span></b><b><span style="font-family:"MS Gothic";color:black">件人</span></b><b><span style="color:black">:</span></b><span style="color:black">
 lustre-devel <lustre-devel-bounces@lists.lustre.org> </span><span style="font-family:"MS Gothic";color:black">代表</span><span style="color:black"> Degremont, Aurelien via lustre-devel <lustre-devel@lists.lustre.org><br>
</span><b><span style="font-family:"PingFang TC",sans-serif;color:black">发</span></b><b><span style="font-family:"MS Gothic";color:black">送</span></b><b><span style="font-family:"PingFang TC",sans-serif;color:black">时间</span></b><b><span style="color:black">:</span></b><span style="color:black">
 2021</span><span style="font-family:"MS Gothic";color:black">年</span><span style="color:black">11</span><span style="font-family:"MS Gothic";color:black">月</span><span style="color:black">25</span><span style="font-family:"MS Gothic";color:black">日</span><span style="color:black">
 18:18<br>
</span><b><span style="font-family:"MS Gothic";color:black">收件人</span></b><b><span style="color:black">:</span></b><span style="color:black"> lustre-devel@lists.lustre.org <lustre-devel@lists.lustre.org><br>
</span><b><span style="font-family:"MS Gothic";color:black">主</span></b><b><span style="font-family:"PingFang TC",sans-serif;color:black">题</span></b><b><span style="color:black">:</span></b><span style="color:black"> [lustre-devel] Recommendation for hsm_restore
 for directories</span> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello all<br>
<br>
I'm doing some early work toward implementing a directory/namespace support for Lustre/HSM. The idea would be to support something similar to hsm_restore/hsm_release but for directories.<br>
<br>
My first thought was for the MDT to not grant LDLM lock for this directory and hold it, while the directory is getting restored by copytool, in a similar fashion than what is done for files. But the hard part here, is to have a way for copytool to access the
 directory while its access is actually prevented by the above locking.<br>
Restoring a file is using this smart trick of restoring it in a different temporary file and using layout swap at the end to move data to the actual real file. It looks difficult to do the same thing here.<br>
<br>
Do you have any recommendation on the right way to frame this directory access for copytools?<br>
<br>
Aurélien<br>
<br>
<br>
_______________________________________________<br>
lustre-devel mailing list<br>
lustre-devel@lists.lustre.org<br>
<a href="http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>