* hole punching in ext4 [not found] <CAKSyJXfvTFjGMO2ZZPsnSjc_fnUzfs2oMrYf7UQoPvO0=98FxA@mail.gmail.com> @ 2013-01-22 14:34 ` Bradley C. Kuszmaul 2013-01-22 15:30 ` Eric Sandeen ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Bradley C. Kuszmaul @ 2013-01-22 14:34 UTC (permalink / raw) To: linux-ext4 Hi, Do any of the ext file systems support hole punching? If so, do the redhat distributions support it? Can someone provide an example of a program that punches a hole in a file in an ext4 file system? -Bradley ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-22 14:34 ` hole punching in ext4 Bradley C. Kuszmaul @ 2013-01-22 15:30 ` Eric Sandeen 2013-01-22 16:20 ` Zheng Liu 2013-01-22 16:38 ` Carlos Maiolino 2 siblings, 0 replies; 7+ messages in thread From: Eric Sandeen @ 2013-01-22 15:30 UTC (permalink / raw) To: Bradley C. Kuszmaul; +Cc: linux-ext4 On 1/22/13 8:34 AM, Bradley C. Kuszmaul wrote: > Hi, > > Do any of the ext file systems support hole punching? ext4 does: [esandeen@host linux-2.6]$ grep -l FALLOC_FL_PUNCH_HOLE fs/ext?/*.[ch] fs/ext4/extents.c > If so, do the redhat distributions support it? Normally a question for Red Hat support, but yes, recent RHEL6 supports punch in ext4. > Can someone provide an example of a > program that punches a hole in a file in an ext4 file system? Upstream fallocate command does with the -p option, for example. -Eric > -Bradley > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-22 14:34 ` hole punching in ext4 Bradley C. Kuszmaul 2013-01-22 15:30 ` Eric Sandeen @ 2013-01-22 16:20 ` Zheng Liu 2013-01-22 23:50 ` Bradley C. Kuszmaul 2013-01-22 16:38 ` Carlos Maiolino 2 siblings, 1 reply; 7+ messages in thread From: Zheng Liu @ 2013-01-22 16:20 UTC (permalink / raw) To: Bradley C. Kuszmaul; +Cc: linux-ext4 On Tue, Jan 22, 2013 at 09:34:59AM -0500, Bradley C. Kuszmaul wrote: > Hi, > > Do any of the ext file systems support hole punching? If so, do the > redhat distributions support it? Can someone provide an example of a > program that punches a hole in a file in an ext4 file system? Hello, Ext4 file system supports hole punching. But until now only extent-based file supports it. As far as I know, redhat distributions don't support hole punching. You can find a sample program from e2fsprogs which is in $e2fsprogs/conrib/fallocate.c. The latest fallocate(1) in util-linux also can be as a demo. Regards, - Zheng ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-22 16:20 ` Zheng Liu @ 2013-01-22 23:50 ` Bradley C. Kuszmaul 2013-01-23 0:03 ` Andreas Dilger 0 siblings, 1 reply; 7+ messages in thread From: Bradley C. Kuszmaul @ 2013-01-22 23:50 UTC (permalink / raw) To: Zheng Liu, linux-ext4 Thanks, this has been a very helpful thread. How do I determine and control whether a file is extent-based? -Bradley On Tue, Jan 22, 2013 at 11:20 AM, Zheng Liu <gnehzuil.liu@gmail.com> wrote: > Ext4 file system supports hole punching. But until now only extent-based > file supports it. As far as I know, redhat distributions don't support > hole punching. You can find a sample program from e2fsprogs which is in > $e2fsprogs/conrib/fallocate.c. The latest fallocate(1) in util-linux > also can be as a demo. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-22 23:50 ` Bradley C. Kuszmaul @ 2013-01-23 0:03 ` Andreas Dilger 2013-01-23 1:38 ` Eric Sandeen 0 siblings, 1 reply; 7+ messages in thread From: Andreas Dilger @ 2013-01-23 0:03 UTC (permalink / raw) To: Bradley C. Kuszmaul; +Cc: Zheng Liu, linux-ext4 On 2013-01-22, at 4:50 PM, Bradley C. Kuszmaul wrote: > Thanks, this has been a very helpful thread. > > How do I determine and control whether a file is extent-based? You can use "lsattr" on the file, and look for the "e" attribute. This should be standard for any ext4-formatted filesystem. For filesystems upgraded from ext3, you need to "tune2fs -O extents" to enable this feature. Cheers, Andreas > On Tue, Jan 22, 2013 at 11:20 AM, Zheng Liu <gnehzuil.liu@gmail.com> wrote: >> Ext4 file system supports hole punching. But until now only extent-based >> file supports it. As far as I know, redhat distributions don't support >> hole punching. You can find a sample program from e2fsprogs which is in >> $e2fsprogs/conrib/fallocate.c. The latest fallocate(1) in util-linux >> also can be as a demo. > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-23 0:03 ` Andreas Dilger @ 2013-01-23 1:38 ` Eric Sandeen 0 siblings, 0 replies; 7+ messages in thread From: Eric Sandeen @ 2013-01-23 1:38 UTC (permalink / raw) To: Andreas Dilger; +Cc: Bradley C. Kuszmaul, Zheng Liu, linux-ext4 On 1/22/13 6:03 PM, Andreas Dilger wrote: > On 2013-01-22, at 4:50 PM, Bradley C. Kuszmaul wrote: >> Thanks, this has been a very helpful thread. >> >> How do I determine and control whether a file is extent-based? > > You can use "lsattr" on the file, and look for the "e" attribute. > > This should be standard for any ext4-formatted filesystem. For > filesystems upgraded from ext3, you need to "tune2fs -O extents" > to enable this feature. But since it sounds like you might be on RHEL, don't do that. We don't test it or support it. If you want ext4, mkfs.ext4 the device and go from there. -Eric > Cheers, Andreas > >> On Tue, Jan 22, 2013 at 11:20 AM, Zheng Liu <gnehzuil.liu@gmail.com> wrote: >>> Ext4 file system supports hole punching. But until now only extent-based >>> file supports it. As far as I know, redhat distributions don't support >>> hole punching. You can find a sample program from e2fsprogs which is in >>> $e2fsprogs/conrib/fallocate.c. The latest fallocate(1) in util-linux >>> also can be as a demo. >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hole punching in ext4 2013-01-22 14:34 ` hole punching in ext4 Bradley C. Kuszmaul 2013-01-22 15:30 ` Eric Sandeen 2013-01-22 16:20 ` Zheng Liu @ 2013-01-22 16:38 ` Carlos Maiolino 2 siblings, 0 replies; 7+ messages in thread From: Carlos Maiolino @ 2013-01-22 16:38 UTC (permalink / raw) To: Bradley C. Kuszmaul; +Cc: linux-ext4 Ext4 supports it, and you can use fallocate(2) with flag FALLOC_FL_PUNCH_HOLE to dealloc space of a specific file (please see `man 2 fallocate` for more info). You can use `fallocate` cmdline program to test it. Ex: fallocate -p -o 1024 -l 4096 <filename> fallocate is available on ext4 since linux 3.1 afaik About Enterprise distros, it's usually better to contact the customer support to get information about availability/supportability of a specific feature. Cheers On Tue, Jan 22, 2013 at 09:34:59AM -0500, Bradley C. Kuszmaul wrote: > Hi, > > Do any of the ext file systems support hole punching? If so, do the > redhat distributions support it? Can someone provide an example of a > program that punches a hole in a file in an ext4 file system? > > -Bradley > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Carlos ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-23 1:39 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAKSyJXfvTFjGMO2ZZPsnSjc_fnUzfs2oMrYf7UQoPvO0=98FxA@mail.gmail.com> 2013-01-22 14:34 ` hole punching in ext4 Bradley C. Kuszmaul 2013-01-22 15:30 ` Eric Sandeen 2013-01-22 16:20 ` Zheng Liu 2013-01-22 23:50 ` Bradley C. Kuszmaul 2013-01-23 0:03 ` Andreas Dilger 2013-01-23 1:38 ` Eric Sandeen 2013-01-22 16:38 ` Carlos Maiolino
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).