-
Notifications
You must be signed in to change notification settings - Fork 7
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
zfs-crypto is far behind ZoL #32
Comments
@FransUrbo I'll take a look at this. I've still got the code pretty fresh in my mind. |
Seems like a good first step would be to get zfs-crypto rebased to a current master. The #1496 pull is based on zfsonlinux/zfs master as of 0377189. I just tried it myself and, so far, the conflicts look pretty minor. |
Sounds good, thanx for looking into this. ZFSRogue is quite busy, but he usually 'comes in' every now and then and accepts pulls etc, so give him a few days for the rebase... :) |
Looks like rogue has merged upstream |
ok sync with 0.6.3, large change with libzfs_core. changing outside, not core of zfs. test please. |
Get compilation errors with latest pull from ZoL:
When I pulled in zfs-crypto, I got these conflicts:
I kept the HEAD stuff. Maybe that was the misstake. On the other hand, dmu_objset_create_check() was rewritten in commit 13fe019 for a reason: commit 13fe019
|
You should get spl-0.6.3 and zfs-0.6.3 and build. I just tried here and had no issues for the whole build. |
I have. But that's not the problem. The problem is that 'oa' isn't defined in module/zfs/dmu_objset.c:dmu_objset_create_check(). That is, if one takes the ZoL version. And looking at the 13fe019 commit, there's quite a number of changes that will/would break havoc if I accepted the zfs-crypto part. Which won't work anyway, since that function only accepts two options now... I think the zfs-crypto part needs to be rewritten with this new code in mind. Cloning ZoL, using latest master/HEAD and then pull zfs-crypto/master will give a number of CONFLICTS that I had to merge manually. I chosed to use the ZoL/master.
|
Yeah, check it out and use it. Dont try to merge it yourself. it was merged with oct 30th zol so it is up to that date. Each merge is a fair bit of work. If you really need to get Nov 1st zol, you'd be better of cherry picking those patches. |
You don't really read what I write, do you? :) That commit was made 'Wed Sep 4'.... My point is that the crypto part still needs a lot of work to get working. There's a number of Illumos merges that's been done, and more is in the pipeline. They all seem to be modifying the core code, which is where, unfortunatly, zfs-crypto 'operates'. |
@FransUrbo, have you actually checked the 0.6.3 branch of zfs-crypto? |
Because of openzfs/zfs#1848, I had to build new kernel, spl and zfs modules. Both ZoL HEAD and 0.6.3 zfs-crypto have problems. Different problems, but still problems. I'm unsure what the problem is at this moment... |
I tried to cherry-pick every commit after 0c28fb4 (Fri Aug 16 15:20:07 2013), and most of them applied, but 8 failed (partly - only got some conflicts):
Fifteen conflicted, but I could manually apply them:
And finaly 74 (!!) commits succeeded. UNFORTUNATLY, the very first one (6f1ffb0) is a dependency on most of the others, so the succeeded ones don't help me much - get massive compile problems :( |
Still not entirely sure what you mean by problems. The merge was a huge amount of work, so I wouldn't try to merge it myself. Pure 0.6.3 branches compile, then install, then compile again, as you will most likely find the linker is picking the OS library (/usr/local/lib maybe) before the in source-tree one. There was also a fix with checksums, the previous crypto branch completely ignored checksums, but this code was finally fixed. So old dataset will not import without checksum errors. The best way around that is most likely to import with -N, then set checksum=none on the crypto dataset, and copy the data to a brand new dataset. |
@lundman my problem is that my previous spl-0.6.1-1.20130514, zfs-0.6.1-1.20130604 on a 3.9.0-rc6 kernel suddenly wouldn't load after a reboot (see the ZoL issue link). The machine and FS worked flawlessly before the reboot, but now I can no longer access (or load) the zfs module. The spl/zfs crypto branch 0.6.3 loads (as does ZoL HEAD), but I still can't import it properly (because it uses the crypto feature) ZoL HEAD seems to work better than crypto 0.6.3, so my hope was to merge the 97 (!!) missing commits to crypto, which I wasn't able to do (well, most of the commits applied more or less cleanly). But there was the eight that I just didn't have the knowledge to fix/apply manually. So my problem isn't with building and installing 0.6.3, it's with a bug (?) in the code somewhere. My previous version seemed to have corrupted my pool (without telling me - there where absolutly no indication before the reboot that something was wrong), but now I can't use either (crypto or ZoL) because my pool is using the encryption feature, and crypto 0.6.3 is to far behind ZoL for me to be able to fix it... |
Are you sure that when you import the pool with crypto-0.6.3, you aren't being hit by the checksum bug-fix I mentioned? If you wish to "roll back the fix" to broken state (so you can copy the data off), you need to comment this line back out |
It doesn't say anything about checksums etc. It just say that the metadata is corrupted - see openzfs/zfs#1848 (comment). And when I try to fix the pool, I simply get an I/O error - openzfs/zfs#1848 (comment). |
Metadata also have checksums. definitely worth testing. |
Well, the code looks completely different now:
So I'm unsure if I should disable the whole section, or just the else if and it's return... ? |
That actually is the code that fixes the checksums. Previous versions were generated incorrectly, so rogue You should keep the checksum code above so that NEW checksums are calculated correct, but comment out the return ECKSUM to ignore checksum failures (due to old code making wrong checksums). |
There's two returns. Which one did you want me to comment out? |
Do both, only way to be sure. :) |
No change. Still OOPSes... |
Not sure you've mentioned any OOPSes so far in this thread... ? |
@lundman If you've read the links I gave you, you might have seen them :). A lot of them... |
I've seen oopses listed on ZOL issues, which I assume are not related to crypto branch, since they will not touch crypto at all. If you have an oops related to crypto you need to place it in an issue in crypto, ie, here, or as a new issue. |
@lundman I never said it was in the crypto code! I have, numerous times, tried to say that zfs-crypto is to far behind for me to be able to import my pool. Again:
Can't make it any clearer/simpler than that I'm afraid... |
Ah ok, so unrelated problem to crypto, other than there are fixes you need. I'm sure we can convince rogue to do another merge this week |
That would be awesome indeed. @zfsrogue If you like, I could send $150 your way. Not much, but maybe that could give some inspiration? :) |
I haven't heard anything specific, but looks like there was another large merge yesterday. |
Nice! I'm not sure I got the merge correctly. The commit message talks about '0.6.3b', which I can't find (might be lag at GitHub). There's a big commit in '0.6.3' which I haven't looked over in detail but I just tried - compiles just fine. It doesn't work as expected though.. I can import the pool correctly, in r/w mode IF (I've only mounted a few, selected filesystems and they work - I'm currently a little afraid of mounting them all and putting the machine in correct runlevel) I supply 'zvol_inhibit_dev=1' to the module. If I don't [supply zvol_inhibit_dev], zpool and then vol_id (from udev) crashes with an OOPS, locking /dev/zfs so I can't run any more ZoL command... I'm not sure where the problem lies, if it's (still) in ZoL or if it's because zfs-crypto is still behind (at least that what it looks like if I diff ZoL/master - haven't seen anything major yet, still looking at the diff). |
Ok, so it doesn't seem like zfs-crypto is behind any more... Thanx @zfsrogue. Let me know how you want me to send you the bounty. Still have problem with ZVOL's though. I'm not sure if I should take this here or on the ZoL tracker... |
Since zfs-crypto is now up-to-date, I'll close this issue. |
I wanted to try the new libzfs_core code, but it breaks zfs-crypto. Tried to merge it myself, but it's a very, very big change and I'm unsure how to do it in some files.
openzfs/zfs#1496
Sooner or later (hopefully sooner :), someone with knowledge of the crypto stuff needs to take care of this, so I'm putting this issue as a 'heads up'.UPDATE: This pull have now (September 4, 2013) been accepted into ZoL HEAD. But there have been huge amounts of work merging illumos fixes into ZoL (and more is in the pipeline). zfs-crypto is currently way behind in commits. Even the 0.6.3 branch which is the work branch for this.
The text was updated successfully, but these errors were encountered: