Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs or crashes when using Ver 0.11.10 with XFS #402

Open
yito24 opened this issue Dec 23, 2024 · 3 comments
Open

Hangs or crashes when using Ver 0.11.10 with XFS #402

yito24 opened this issue Dec 23, 2024 · 3 comments

Comments

@yito24
Copy link

yito24 commented Dec 23, 2024

I tested 0.11.10 on the following operating systems:

  • RHEL9.5 with XFS
  • Ubuntu24.04 LTS with XFS
  • openSUSE 15.6 with XFS

Using XFS on this OS causes crashes.
No crashes with EXT4.

This occurs in this function.
[ bio_needs_cow ]

I've attached the dmesg.txt from Ubuntu 24.04.
dmesg.202412231756.txt

Already reported for RHEL9.5.
#396 (comment)

@iamandrii
Copy link
Collaborator

Hi @yito24, thank you for the dmesg.

The issue is currently under investigation. Hope to fix it soon.

@yito24
Copy link
Author

yito24 commented Dec 23, 2024

I have merged the elastio-snap code and am testing it, and no crashes have occurred.
Hope this helps!!

bio_helper.c

	if (PageAnon(pg))
		return NULL;
	if (!pg->mapping)
		return NULL;
	if (!virt_addr_valid(pg->mapping))
		return NULL;
	return pg->mapping->host;
	int bio_needs_cow(struct bio *bio, struct inode *inode)
{
	bio_iter_t iter;
	bio_iter_bvec_t bvec;

	/*if (!test_bit(COW_ON_BDEV, &dev->sd_cow_state)) {
		return 1;
	}*/

#if (defined HAVE_ENUM_REQ_OPF) || \
	(defined HAVE_ENUM_REQ_OP && defined HAVE_WRITE_ZEROES)
	// HAVE_ENUM_REQ_OPF: KERNEL_VERSION >= 4.10 && KERNEL_VERSION <= 5.19
	// HAVE_ENUM_REQ_OP: KERNEL_VERSION < 4.10 && KERNEL_VERSION >= 6.0
	// HAVE_WRITE_ZEROES: KERNEL_VERSION >= 4.10
	if(bio_op(bio) == REQ_OP_WRITE_ZEROES)
		return 1;
#endif

	//check the inode of each page return true if it does not match our cow file
	bio_for_each_segment(bvec, bio, iter) {
		if (page_get_inode(bio_iter_page(bio, iter)) != inode){
			return 1;
		}
	}

	return 0;

@iamandrii
Copy link
Collaborator

Thanks, will take a look soon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants