<div dir="ltr">can we change the existing file's extent size?<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 11:10 AM, Dave Chinner <span dir="ltr"><<a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, May 31, 2016 at 10:43:36AM +0800, 陈宗志 wrote:<br>
> I have fint the way to change the extent size hint<br>
> mkfs.xfs -r extsize=40960 /dev/sda1<br>
<br>
</span>Ah, no, that isn't the extsize I'm refering to. That's for realtime<br>
device configuration at mkfs, not a per-inode extent size hint.<br>
<br>
When you create the image file do this:<br>
<br>
$ xfs_io -f -c "extsize 1m" /path/to/new/vm_image<br>
$ qemu-image create -f qcow2 /path/to/new/vm_image 10g<br>
$ xfs_io -c extsize /path/to/new/vm_image<br>
[1048576] /path/to/new/vm_image<br>
$<br>
<br>
And now the qcow2 image file will have extents allocated in<br>
multiples of 1MB.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
<br>
Dave.<br>
--<br>
Dave Chinner<br>
<a href="mailto:david@fromorbit.com">david@fromorbit.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>---<br>Blog: <a href="http://www.chenzongzhi.info" target="_blank">http://www.chenzongzhi.info</a><br>Twitter: <a href="https://twitter.com/#%21/baotiao" target="_blank">https://twitter.com/baotiao</a><br>Git: <a href="https://github.com/baotiao" target="_blank">https://github.com/baotiao</a><br></div></div></div>
</div>