Linux Overlay Filesystem development
 help / color / mirror / Atom feed
* [PATCH] xfstest, overlayfs: Use falloc to make sure a meta copy file got copied up
@ 2019-02-04 18:34 Vivek Goyal
  2019-02-04 20:04 ` Amir Goldstein
  0 siblings, 1 reply; 2+ messages in thread
From: Vivek Goyal @ 2019-02-04 18:34 UTC (permalink / raw)
  To: fstests, linux-unionfs; +Cc: Amir Goldstein, Miklos Szeredi

Overlayfs might copy up data of file on first write of file (and
not necessarily upon open of file). So call falloc file opened
with O_RDWR and after that data must have been copied up.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 tests/overlay/060 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: xfstests-dev/tests/overlay/060
===================================================================
--- xfstests-dev.orig/tests/overlay/060	2018-08-27 11:21:51.811847671 -0400
+++ xfstests-dev/tests/overlay/060	2019-02-04 11:28:09.023718690 -0500
@@ -170,7 +170,7 @@ test_common()
 
 	# Trigger data copy up and check absence of metacopy xattr.
 	mount_overlay $_lowerdir
-	$XFS_IO_PROG -c "open -a $SCRATCH_MNT/$_target"
+	$XFS_IO_PROG -c "falloc 0 1" $SCRATCH_MNT/$_target >> $seqres.full
 	echo "check properties of data copied up file"
 	check_file_size_contents $SCRATCH_MNT/$_target $_size "$_data"
 	umount_overlay

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfstest, overlayfs: Use falloc to make sure a meta copy file got copied up
  2019-02-04 18:34 [PATCH] xfstest, overlayfs: Use falloc to make sure a meta copy file got copied up Vivek Goyal
@ 2019-02-04 20:04 ` Amir Goldstein
  0 siblings, 0 replies; 2+ messages in thread
From: Amir Goldstein @ 2019-02-04 20:04 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: fstests, overlayfs, Miklos Szeredi

On Mon, Feb 4, 2019 at 8:34 PM Vivek Goyal <vgoyal@redhat.com> wrote:
>
> Overlayfs might copy up data of file on first write of file (and
> not necessarily upon open of file). So call falloc file opened
> with O_RDWR and after that data must have been copied up.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>

> ---
>  tests/overlay/060 |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: xfstests-dev/tests/overlay/060
> ===================================================================
> --- xfstests-dev.orig/tests/overlay/060 2018-08-27 11:21:51.811847671 -0400
> +++ xfstests-dev/tests/overlay/060      2019-02-04 11:28:09.023718690 -0500
> @@ -170,7 +170,7 @@ test_common()
>
>         # Trigger data copy up and check absence of metacopy xattr.
>         mount_overlay $_lowerdir
> -       $XFS_IO_PROG -c "open -a $SCRATCH_MNT/$_target"
> +       $XFS_IO_PROG -c "falloc 0 1" $SCRATCH_MNT/$_target >> $seqres.full
>         echo "check properties of data copied up file"
>         check_file_size_contents $SCRATCH_MNT/$_target $_size "$_data"
>         umount_overlay

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-04 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-04 18:34 [PATCH] xfstest, overlayfs: Use falloc to make sure a meta copy file got copied up Vivek Goyal
2019-02-04 20:04 ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox