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

Cannot write files to filesystem, commit 933ec99 (commit 986dd8a works) #5720

Closed
inkdot7 opened this issue Feb 1, 2017 · 15 comments
Closed

Comments

@inkdot7
Copy link
Contributor

inkdot7 commented Feb 1, 2017

System information

Type Version/Name
Distribution Name Debian
Distribution Version Jessie
Linux Kernel 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30)
Architecture x86_64
ZFS Version v0.7.0-rc3_35_g933ec99
SPL Version v0.7.0-rc3_2_g9704820

Describe the problem you're observing

Writes fail with commit 933ec99, reporting that the filesystem is full. With commit 986dd8a it works.

Describe how to reproduce the problem

scripts/zfs.sh
cmd/zpool/zpool create -f lcl sdd3
cmd/zfs/zfs create lcl/t1
touch /lcl/t1/qqq
dd if=/dev/zero of=/lcl/t1/zeros1

the last command reports failure:

dd: skrivning till ”/lcl/t1/zeros1”: Enheten är full
1+0 poster in
0+0 poster ut
0 byte (0 B) kopierade, 0,000255897 s, 0,0 kB/s

Commit 933ec99 is for PR #5673 . Is the problem some kind of kernel configuration with my (old?) kernel?

I did redo

./autogen.sh
./configure --with-spl=/home/htj/z/sep11/spl --enable-debug
make clean
make -j 5

after checkout of 933ec99. (And same with 986dd8a that works.)

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

Please post the config.log for zfs.
Also, run dd again with strace.
And try again with this patch https://gist.github.com/tuxoko/9fb1f59717770de9d43d6d6f7c7a29c8

@inkdot7
Copy link
Contributor Author

inkdot7 commented Feb 1, 2017

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

OK I found the bug. It would affect kernel version 3.16-4.0
I wonder why the test suite didn't catch it.

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

Try this #5726

@behlendorf
Copy link
Contributor

The Debian builder should have caught this, it's running a 3.16.0-4-amd64 kernel. Also related to these changes see comment 933ec99#commitcomment-20703820

@behlendorf
Copy link
Contributor

We're only doing build tests on Debian we don't run the full test suite. There must not be any other kernels in that range running the full suite.

tuxoko referenced this issue Feb 1, 2017
The .write/.read file operations callbacks can be retired since
support for .read_iter/.write_iter and .aio_read/.aio_write has
been added.  The vfs_write()/vfs_read() entry functions will
select the correct interface for the kernel.  This is desirable
because all VFS write/read operations now rely on common code.

This change also add the generic write checks to make sure that
ulimits are enforced correctly on write.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5587 
Closes #5673
@grizzlyfred
Copy link

@tuxoko As requested, here the config on my fedora backup box 4.9.6-200.fc25.x86_64 now running 986dd8a ("OpenZFS 5561 - support root pools on EFI/GPT partitioned disks", 2017-01-27)
Because 933ec99 fails to build for me.
config.log.txt

There is not much done on that box, it runs 2x2TB HDDs, and an old SSD for a xfs-over-bcache-over-zvol (thanks to yet non-persistent l2arc). So in a way it is good that the federa zfs packages and/or my dkms failed working, I come to contribute to zfs ;-) Although I had a different mind tonight... on my manjaro the tortoishg is broke thanks to qscintilla bindings for python not updated. So the missing zpool (again) on the backup box is rather 2nd prio,..

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

@grizzlyfred
You need to upload the one where build fails.

@grizzlyfred
Copy link

grizzlyfred commented Feb 1, 2017

I thought it was that. I built the 986dd8a ("OpenZFS 5561 - support root pools on EFI/GPT partitioned disks", 2017-01-27) into kmod rpms and installed them, then I git pulled and then I used gitk to hardreset
to 933ec99 configure/make/make pgk... again and then uploaded the file.
Unfortunately, albeit I have I have btrfs as root, I have no automatic snapshotting (think diy snapper or the zfs-auto-snapshot) as on the main workstation, so I cannot check whether it differs from the one which just did build. Sorry. If you really think it is the wrong file, I can ./configure again. But I think my workflow was correct. The fail happens at "make" phase

@inkdot7
Copy link
Contributor Author

inkdot7 commented Feb 1, 2017

@grizzlyfred you may want to look at #4365. (Especially if you have some test box. I have a test backup machine up running with a version of it since a month.) It ought to be more potent than persistent l2arc.

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

@grizzlyfred
Then you'll need to ./configure again.

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

@grizzlyfred
Ok, never mind, you didn't run ./autogen.sh, and that's the problem.

@grizzlyfred
Copy link

grizzlyfred commented Feb 1, 2017

Now that you say.. I overlooked that on https://github.com/zfsonlinux/zfs/wiki/Custom-Packages

Be aware that when building directly from a git repository you must first run the autogen.sh script to create the configure script."

I never read that text on top, just the commands down. My bad. Now I feel stupid. Yeah autogen.... How could I forget... Will see if that changes anything...

@tuxoko
Copy link
Contributor

tuxoko commented Feb 1, 2017

Yeah, you need to rerun ./autogen.sh when you switch version, otherwise new conftest won't get run.

@grizzlyfred
Copy link

Yep. Current head 0f676dc successfully built.

behlendorf pushed a commit to behlendorf/zfs that referenced this issue Feb 2, 2017
For generic_write_checks with 2 args, we can exit when it returns zero because
it means count is zero. However this is not the case for generic_write_checks
with 4 args, where zero means no error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes openzfs#5720 
Closes openzfs#5726
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Feb 2, 2017
For generic_write_checks with 2 args, we can exit when it returns zero because
it means count is zero. However this is not the case for generic_write_checks
with 4 args, where zero means no error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes openzfs#5720
Closes openzfs#5726
Requires-builders: style
behlendorf pushed a commit that referenced this issue Feb 3, 2017
For generic_write_checks with 2 args, we can exit when it returns zero because
it means count is zero. However this is not the case for generic_write_checks
with 4 args, where zero means no error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5720
Closes #5726
wli5 pushed a commit to wli5/zfs that referenced this issue Feb 28, 2017
For generic_write_checks with 2 args, we can exit when it returns zero because
it means count is zero. However this is not the case for generic_write_checks
with 4 args, where zero means no error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes openzfs#5720 
Closes openzfs#5726
wli5 pushed a commit to wli5/zfs that referenced this issue Feb 28, 2017
For generic_write_checks with 2 args, we can exit when it returns zero because
it means count is zero. However this is not the case for generic_write_checks
with 4 args, where zero means no error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes openzfs#5720
Closes openzfs#5726
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

4 participants