<div dir="ltr">Hi Lustre devs,<br><br>I came across the code and noticed an implementation difference between fallocate and truncate/punch operations under the lustre/osd-ldiskfs/. While <b>osd_fallocate</b>() is handled in the Lustre OSD layer, <b>osd_punch</b>() remains in the ldiskfs layer, both of which may relate to multiple transactions as their comments suggested.<br>- from <a href="https://review.whamcloud.com/c/fs/lustre-release/+/39342">LU-13765</a>, it explains why move fallocate() from ldiskfs upto OSD layer (due to unpredictable credits ahead), however truncate() resides in ldiskfs layer instead of moving upto OSD layer?<br>- <a href="https://review.whamcloud.com/c/fs/lustre-release/+/27488">LU-10048</a> claims to "avoids restarting truncate transaction handles in main transaction", while in osd_fallocate_preallocate() it seems there's no such concern? Besides, why should we avoid restarting?<br><br>Correct me if I misunderstood the code above...Thank you for your input.<br><br>Best Regards,<br>kg.xu</div>