[Ocfs2-users] how to find out the real size of a reflink ?

Herbert Van Den Bergh HERBERT.VAN.DEN.BERGH at ORACLE.COM
Tue Jan 12 10:22:17 PST 2021



> On Jan 12, 2021, at 10:02 AM, Herbert Van Den Bergh <HERBERT.VAN.DEN.BERGH at ORACLE.COM> wrote:
> 
> On Jan 12, 2021, at 3:16 AM, Lentes, Bernd <bernd.lentes at helmholtz-muenchen.de> wrote:
>> 
>> 
>> 
>> ----- On Jan 11, 2021, at 6:20 PM, herbert van den bergh HERBERT.VAN.DEN.BERGH at ORACLE.COM wrote:
>> 
>>> Hi Bernd,
>>> 
>>> See if any of the info here helps:
>>> 
>>> https://unix.stackexchange.com/questions/263309/how-to-verify-a-file-copy-is-reflink-cow/
>>> 
>>> Thanks,
>>> Herbert.
>>> 
>> Hi herbert,
>> 
>> thanks for your message. Unfortunatley it doesn't help.
>> It's about BTRFS.
>> I found shared-du may help, but i don't find the respective binary.
>> Neither in the web nor in my Suse repositories.
>> 
>> Bernd
> 
> Hi Bernd,
> 
> Actually, some of those tools should be filesystem type independent as long as the filesystem supports the ioctl() that is used to get the file extents and their flags. At some point OCFS2 and btrfs were using different interfaces, but this functionality has now been moved up to the vfs layer so it should work the same for both. I suggest you give them a try anyway and let us know if they work.
> 
> If that doesn’t work, then I can try to dig up a link to the shared-filefrag source code. The code changes that were done to show the shared flag of extents were simple. They may actually already be merged into the upstream e2fsprogs code, so you could try building that from source.

Here it is:

https://patchwork.ozlabs.org/project/linux-ext4/patch/1379317284-20311-1-git-send-email-bo.li.liu@oracle.com/

As I said, it’s an extremely simple change. If SUSE doesn’t include this in the filefrag version they ship then you may want to ask them for an updated version. Or rebuild it from source with this patch applied.

Thanks,
Herbert.


> 
> Thanks,
> Herbert.
> 
>> Helmholtz Zentrum München
>> 
>> Helmholtz Zentrum Muenchen
>> Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
>> Ingolstaedter Landstr. 1
>> 85764 Neuherberg
>> www.helmholtz-muenchen.de
>> Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling
>> Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Kerstin Guenther
>> Registergericht: Amtsgericht Muenchen HRB 6466
>> USt-IdNr: DE 129521671
>> 
>> 
>> _______________________________________________
>> Ocfs2-users mailing list
>> Ocfs2-users at oss.oracle.com
>> https://oss.oracle.com/mailman/listinfo/ocfs2-users
> 
> 
> _______________________________________________
> Ocfs2-users mailing list
> Ocfs2-users at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-users




More information about the Ocfs2-users mailing list