Re: [zfs-discuss] about btrfs and zfs
On 11/13/2011 05:18 PM, Nomen Nescio wrote: LOL. Well, for what it's worth, there are three common pronunciations for btrfs. Butterfs, Betterfs, and B-Tree FS (because it's based on b-trees.) Check wikipedia. (This isn't really true, but I like to joke, after saying something like that, I wrote the wikipedia page just now.) ;-) You forget Broken Tree File System, Badly Trashed File System, etc. Follow the newsgroup and you'll get plenty more ideas for names ;-) Why not give some tolerance to Btrfs? You can kindly drop an email to its mail list for any issue you are not satisfied with. Satirize or lampoon does not make sense to any open source project. Thanks, -Jeff ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] SEEK_HOLE returns the whole sparse file size?
在 2011-4-18,下午6:03, Joerg Schilling 写道: jeff.liu jeff@oracle.com wrote: Hello List, I am trying to fetch the data/hole info of a sparse file through the lseek(SEEK_HOLE/SEEK_DATA) stuff, the result of fpathconf(..., _PC_MIN_HOLE_SIZE) is ok, so I think this interface is supported on my testing ZFS, but SEEK_HOLE always return the sparse file total size instead of the desired first hole start offset. Maybe you did not create the file correctly. If you like to create a file of a specific size that only contains one single hole, there is a way to do this using star: mkfile size some-file # create a file of the desired size star -c f=xx.tar -meta some-file # archive the meta data only rm some-file # remove original file star -x -xmeta -force-hole f=xx.tar # let star create an empty file of the # same size This will try to create a file that has one hole but no data in case the filesystem supports to do this. For UFS, such a file e.g. needs to be a multiple of 8k in size. This is because holes in UFS need to be aligned at 8k boundaries and need to be a multiple of 8k in size. A recent star can be found in the schily source consolidation: ftp://ftp.berlios.de/pub/schily/ star is part of Schillix-ON (a free OpenSolaris fork). Thanks for your info! Actually, I'd like to create a sparse file with both data and holes to test a patch I am working on, it was wrote for Coreutils to optimize sparse file reading, especially for cp(1). I had took a look at the source code of Star before, and I was wondering of comments at start/hole.c: sparse_file(fp, info) at that time, line: 1240if (pos = info-f_size) { /* Definitely not sparse */ Now, I am still not sure why the returned 'pos' could larger than 'info-f_size' in some cases, I guess it should be equal to the f_size if the target file is not sparse, Am I missing something here? For the sparse file I created via python -c f=open('sparse', 'w'); f.seek(40960); f.write('BYE'); f.close(), IMHO, it is a right way to create a sparse file conventionally, but it is too small to spanning across multiple blocks, so ZFS allocate it as an non-sparse single block file just as Victor's response. Regards, -Jeff Jörg -- EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin j...@cs.tu-berlin.de(uni) joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] ZFS utility like Filefrag on linux to help analyzing the extents mapping
Hello All, I'd like to know if there is an utility like `Filefrag' shipped with e2fsprogs on linux, which is used to fetch the extents mapping info of a file(especially a sparse file) located on ZFS? I am working on efficient sparse file detection and backup through lseek(SEEK_DATA/SEEK_HOLE) on ZFS, and I need to verify the result by comparing the original sparse file and the copied file, so if there is such a tool available, it can be used to analyze the start offset and length of each data extent. Thanks in advance! -Jeff ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] ZFS utility like Filefrag on linux to help analyzing the extents mapping
Hi Fajar, Thanks for your quick response, just playing it around for a while, it is very useful to me. Have a nice day! -Jeff 在 2011-2-16,下午10:16, Fajar A. Nugraha 写道: On Wed, Feb 16, 2011 at 8:53 PM, Jeff liu jeff@oracle.com wrote: Hello All, I'd like to know if there is an utility like `Filefrag' shipped with e2fsprogs on linux, which is used to fetch the extents mapping info of a file(especially a sparse file) located on ZFS? Something like zdb - maybe? http://cuddletech.com/blog/?p=407 -- Fajar I am working on efficient sparse file detection and backup through lseek(SEEK_DATA/SEEK_HOLE) on ZFS, and I need to verify the result by comparing the original sparse file and the copied file, so if there is such a tool available, it can be used to analyze the start offset and length of each data extent. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss