lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 9 Dec 2012 03:29:59 +0800
From:	Forrest Liu <forrestl@...ology.com>
To:	"Theodore Ts'o" <tytso@....edu>
Cc:	Ashish Sangwan <ashishsangwan2@...il.com>,
	Eric Sandeen <sandeen@...hat.com>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix extent tree corruption that incurred by hole punch

Hi Ted,
    I have test patch with Ashish's modification, and that have
problem when depth of extent tree is greater than 2.

   I will make a test case with your patch.

Thanks,
Forrest


2012/12/8 Theodore Ts'o <tytso@....edu>:
> Hi Forrest,
>
> Can you share an updated version of your patch (with Ashish's
> modification if you've tried testing that)?  And also can you send us
> some automated way to create your test case?  That might make it
> easier for us all to test the same thing and all be on the same page.
>
> I assume you have some C program which which is doing all of the
> punching?
>
> I started trying to create something via a script like this:
>
> touch testfile
> fallocate -l 1G testfile
> for i in $(seq 0 8192 1073741824) ; do fallocate -p -o $i -l 4k testfile ; done
>
> .. where fallocate is from contrib/fallocate.c in the e2fsprogs
> sources (not the fallocate from util-linux) with the attached patch to
> add support for the -p option to do the pnuching.... but then I
> decided it might be better if we all standardized on the same test
> case.  Ideally, if the test case is small enough, we can put it in the
> commit message, or at very least we should look into getting it into
> xfstests, and Eric has suggested.
>
> Cheers,
>
>                                                 - Ted
>
> commit 2658b9616fe63d2fd9e2654676877ab014639a92
> Author: Theodore Ts'o <tytso@....edu>
> Date:   Thu Dec 6 11:21:44 2012 -0500
>
>     contrib/fallocate: add support for punch functionality
>
>     Also fix the -o option so it works correctly (instead of core
>     dumping).
>
>     Signed-off-by: "Theodore Ts'o" <tytso@....edu>
>
> diff --git a/contrib/fallocate.c b/contrib/fallocate.c
> index 0e8319f..1436b70 100644
> --- a/contrib/fallocate.c
> +++ b/contrib/fallocate.c
> @@ -35,6 +35,7 @@
>
>  // #include <linux/falloc.h>
>  #define FALLOC_FL_KEEP_SIZE    0x01
> +#define FALLOC_FL_PUNCH_HOLE   0x02 /* de-allocates range */
>
>  void usage(void)
>  {
> @@ -94,12 +95,17 @@ int main(int argc, char **argv)
>         int     error;
>         int     tflag = 0;
>
> -       while ((opt = getopt(argc, argv, "nl:ot")) != -1) {
> +       while ((opt = getopt(argc, argv, "npl:o:t")) != -1) {
>                 switch(opt) {
>                 case 'n':
>                         /* do not change filesize */
>                         falloc_mode = FALLOC_FL_KEEP_SIZE;
>                         break;
> +               case 'p':
> +                       /* punch mode */
> +                       falloc_mode = (FALLOC_FL_PUNCH_HOLE |
> +                                      FALLOC_FL_KEEP_SIZE);
> +                       break;
>                 case 'l':
>                         length = cvtnum(optarg);
>                         break;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ