1319932872 M * Bertl now, another thing which doesn't make sense atm is the put/get/new_dentry part in out_redo: 1319932895 M * daniel_hozac what do you have it as now? 1319932899 M * Bertl because with the new_path -> new_dentry change, we basically get the new_dentry just to put it 1319932926 M * Bertl which is kind of fine if we need out_rel_both: as jump in point 1319932937 M * Bertl let me upload the code so far ... 1319932965 M * daniel_hozac http://paste.linux-vserver.org/20658 is what i have for out_redo 1319933045 M * daniel_hozac although that is also wrong. dput needs to go before do_path_lookup, so it also fixes the error case. 1319933109 M * Bertl http://vserver.13thfloor.at/Stuff/cow_break_link.txt 1319933321 M * daniel_hozac hmm. we are supposed to return with one reference to new_dentry still around. maybe we shouldn't dput it in out_rel_both? 1319933338 M * daniel_hozac or maybe we need to get two references in out_redo, and one somewhere after vfs_rename. 1319933383 M * Bertl ah, okay, no, just no dput(new_dentry) should do in this case 1319933401 M * daniel_hozac that will mess up failure paths, won't it? 1319933404 M * Bertl and if we have an error, we must make sure to put it 1319933415 M * Bertl we can do optimization lateron 1319933449 M * Bertl I'm fine with error pathes doing an explicit dput() for now 1319933474 M * Bertl or we can simply dput(new_dentry) if ret is set and new_dentry valid 1319933474 M * daniel_hozac i guess we should make it if (ret) dput(new_dentry); 1319933481 M * Bertl precisely :) 1319933529 J * fisted_ ~fisted@xdsl-87-78-219-141.netcologne.de 1319933545 M * Bertl dput checks for !dentry so we are fine there as well 1319933585 M * Bertl only problem would be new_dentry = ERR() 1319933598 Q * fisted Ping timeout: 480 seconds 1319933621 M * Bertl and we cover that with the retry, in which case we probably should zero out new_dentry 1319933623 M * daniel_hozac i don't think we can end up at that label with that set. 1319933638 M * Bertl I think we easily can 1319933650 M * daniel_hozac hmm, yes, too many retries 1319933654 M * daniel_hozac you're right. 1319933682 M * Bertl so simply new_dentry = NULL should solve that 1319933692 M * daniel_hozac right. 1319933704 M * Bertl (in the error case) or we could use 'res' there and assing the new_dentry after 1319933726 M * daniel_hozac zeroing new_dentry in the error case seems fine to me. 1319933744 M * Bertl I'd even go one step further and zero it out on retry 1319933759 M * Bertl because we have a second error case which branches to retry 1319933771 M * Bertl (the EEXIST one) 1319933777 M * daniel_hozac fair enough. 1319934067 M * Bertl hmm, okay, I think I know why we had the new_path() 1319934071 M * Bertl -() 1319934074 M * daniel_hozac oh? 1319934111 M * Bertl not just because of the symmetry, but dentry_open cleans (or at least cleaned) up dentry and mnt 1319934122 M * daniel_hozac right, it does. 1319934127 M * Bertl which basically is a path_put() on new_path 1319934162 M * daniel_hozac i replaced it with new_file = dentry_open(dget(new_dentry), mntget(old_path.mnt), 1319934199 M * Bertl fair enough, that should work as well 1319934234 M * daniel_hozac not as pretty, but seems good enough to me. 1319934256 M * Bertl well, I put the dget/mntget before the call, which should work as well 1319934269 M * daniel_hozac sure. 1319934318 M * Bertl new_dentry = IS_ERR(old_file) ? (void *) old_file : new_dentry; 1319934331 M * Bertl in the !old_file/IS_ERR(old_file) case 1319934336 M * Bertl seems to be another bug 1319934348 M * daniel_hozac ret = IS_ERR(old_file) ? PTR_ERR(old_file) : -ENOENT; 1319934352 M * Bertl because we actually want to set ret instead 1319934357 M * daniel_hozac yeah. 1319934363 M * daniel_hozac which new_file does correctly. 1319934460 M * Bertl yeah, well, not sure what the -ENOENT is about actually 1319934468 M * Bertl so I'd rather go for: 1319934499 M * Bertl ah, is that the !old_file case? 1319934525 M * Bertl (or !new_file) 1319934561 M * daniel_hozac i don't think dentry_open will ever return NULL. 1319934623 M * daniel_hozac so i'd be okay with just putting a ret = PTR_ERR(old_file); in the error case, and not checking for !old_file/!new_file. 1319934654 M * Bertl let me take a quick look at dentry_open first, but makes sense 1319934777 M * Bertl yep, we should be fine there 1319934783 Q * quasisane Quit: leaving 1319935055 M * Bertl okay, I updated the cow_break_link.txt 1319935130 M * Guy- Bertl: nfsv4 1319935153 M * Guy- Bertl: I can force v3 if that's expected to help 1319935156 M * Bertl try with nfsv3, v4 requires uid/gid negotiation which probably fails 1319935163 M * Guy- OK 1319935176 M * Guy- why would it fail, though? 1319935191 M * Bertl because you are missing the identd inside the guest? 1319935206 M * Bertl (or whatever it is called :) 1319935311 M * Guy- you mean it works via the tcp auth service (port 113?) 1319935341 M * daniel_hozac no, it has its own. 1319935342 M * Guy- also, rpc.mountd reports the client IP as being the host's primary IP, not the guest's IP 1319935343 M * daniel_hozac idmapd IIRC 1319935352 M * daniel_hozac Bertl: a few differences between ours... i have "kern_path_create(new): %p", new_dentry 1319935354 M * Guy- I'm running idmapd on the host 1319935357 M * Bertl yep, that's the name 1319935368 M * Bertl you need it on host and guest AFAIK 1319935414 M * Bertl daniel_hozac: in the error case that probably should be %d and ERR_PTR(new_dentry) 1319935435 M * daniel_hozac yeah, agreed. 1319935451 M * daniel_hozac in out_redo, i have path_put(&old_nd.path); after the dget 1319935465 M * Guy- Bertl: even though rpc.mountd thinks the mount request is coming from the host? (trying with nfsv3 meanwhile) 1319935488 M * daniel_hozac so we clean up the references taken by the new do_path_lookup 1319935495 M * Guy- yes, it works with v3 1319935517 M * Bertl NFSv4 is strange :) 1319935573 M * Bertl daniel_hozac: agreed, we need to free that up again 1319935676 M * daniel_hozac other than that i think we're good. 1319935692 M * Bertl now gcc complains that vfs_create gets the wrong argument 1 1319935731 M * Bertl because the dir should be an inode 1319935770 M * daniel_hozac hehe 1319935774 M * Bertl so that should be &dir->d_inode 1319935802 M * daniel_hozac i think without the & 1319935816 M * Bertl yep right 1319935826 M * daniel_hozac the dget(&new_dentry) should be dget(new_dentry) too 1319935833 M * daniel_hozac (before new_file) 1319935874 M * daniel_hozac and we should initialize new_dentry to NULL so the early failures don't try to dput some random pointer :) 1319935912 M * Bertl good point 1319935989 M * Bertl okay, the refcount issue you saw probably manifested in a testfs run with the unmount/remount, yes? 1319935995 M * daniel_hozac yeah 1319935997 M * daniel_hozac exactly 1319936011 M * Bertl good, that's why we have that 'test' there :) 1319936055 M * Bertl I'll do a compile/test run on that code now, as it looks like it should be fine to me 1319936081 M * daniel_hozac yeah, it looks good to me too. i'm rebooting my kvm now... 1319936125 M * daniel_hozac (i had to add a cow_check_and_break to sys_fchmodat, otherwise the COW test was failing) 1319936169 M * daniel_hozac all success now though :-) 1319936270 Q * bonbons Quit: Leaving 1319936467 M * Bertl sounds good, still compiling here, fresh three 1319936469 M * Bertl *tree 1319936500 M * Bertl so we cleaned that 'puppy' up then :) 1319936528 M * daniel_hozac indeed 1319936533 M * daniel_hozac it seems like it was long overdue. 1319936535 M * Bertl probably need to backport some of the cleanups for 2.6.32 and such 1319936554 M * daniel_hozac yeah. 1319936587 M * Bertl do you have a patch for the sys_fchmodat at hand? 1319936660 M * daniel_hozac http://people.linux-vserver.org/~dhozac/p/k/delta-cow-fix27.diff 1319936665 M * Bertl tx 1319936965 M * Bertl I think we have an rc2 which can be used :) 1319936992 M * Bertl (will upload the patch shortly) 1319937028 M * daniel_hozac cool :) 1319937059 M * Bertl thanks for your time and for going through the code with me 1319937074 M * daniel_hozac my pleasure 1319937127 M * Bertl I will add some more comments where appropriate explaining a few details on the inner workings and try to clean up the error cases (if possible) 1319937170 M * Bertl but for now I'm happy with the result 1319937212 M * daniel_hozac yeah, i am too. we certainly got a lot of bugs fixed there. 1319937240 M * Bertl yes, indeed ... okay, patch is up if somebody wants to test 1319937305 M * Bertl I'm off to bed now ... was a long day for me :) 1319937324 M * daniel_hozac good night :) 1319937333 M * Bertl you too ... ca and thanks again! 1319937343 N * Bertl Bertl_zZ 1319937373 M * Guy- (fwiw, I updated the faq with the bit about nfsv4 and idmap) 1319940415 J * aj__ ~aj@p4FFD11F8.dip.t-dialin.net 1319940848 Q * derjohn_foo Ping timeout: 480 seconds 1319943980 J * derjohn_foo ~aj@p4FFD391C.dip.t-dialin.net 1319944366 Q * aj__ Ping timeout: 480 seconds 1319955156 M * arekm ohh, rc2 1319955919 M * arekm Bertl_zZ: any reason for this not being merged? http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff 1319955931 J * hijacker_ ~hijacker@cable-84-43-136-96.mnet.bg 1319956684 Q * hparker Quit: Quit 1319957549 J * ghislain ~AQUEOS@adsl2.aqueos.com 1319957861 M * arekm 3.1.0 rc2 booted, no problems so far 1319959395 Q * hijacker_ Quit: Leaving 1319964330 J * hijacker_ ~hijacker@cable-84-43-136-96.mnet.bg 1319964412 Q * Romster Quit: Geeks shall inherit properties and methods of object earth. 1319964890 J * sannes1 ~ace@cm-84.209.106.118.getinternet.no 1319966513 N * Bertl_zZ Bertl 1319966523 M * Bertl morning folks! 1319966530 M * Bertl arekm: merged with what? 1319966706 J * bonbons ~bonbons@2001:960:7ab:0:30cb:d160:ad2e:e517 1319968500 M * arekm Bertl: with vserver patch 1319968985 M * Bertl please rephrase, I'm not sure what you are talking about 1319970687 J * Romster ~romster@202.168.100.149.dynamic.rev.eftel.com 1319970711 M * daniel_hozac it requires patching iptables/ip6tables 1319970831 J * hparker ~hparker@2001:470:1f0f:32c:beae:c5ff:fe01:b647 1319970865 M * daniel_hozac and guests tend to have their own IP addresses that you can filter on just as well, even on incoming where -m owner doesn't work. 1319970976 Q * Aiken Ping timeout: 480 seconds 1319971336 M * Bertl ah, now I got it ... somehow overlooked the url 1319971375 M * Bertl (didn't make sense to me why 'rc2' wouldn't be 'merged' :) 1319971693 M * Bertl such complicated questions on an early sunday morning *g* 1319971810 M * daniel_hozac hehe 1319971919 Q * hijacker_ Quit: Leaving 1319972733 M * Bertl btw, that patch makes me wonder why we still have sk_xid? 1319972885 M * Bertl sk_vx_info we still use for socket accounting ... but we could move that to nx_info as well, I guess 1319973238 M * Bertl okay, off for now ... bbl 1319973242 N * Bertl Bertl_oO 1319978519 J * fisted ~fisted@xdsl-87-78-211-252.netcologne.de 1319978568 Q * fisted_ Ping timeout: 480 seconds 1319985729 J * hijacker_ ~hijacker@cable-84-43-136-96.mnet.bg 1319987252 Q * hparker Quit: Quit 1319988423 Q * FireEgl Ping timeout: 480 seconds 1319988990 J * FireEgl FireEgl@2001:470:e056:1:3098:734e:60c9:d1d8 1319989780 Q * FireEgl Read error: Connection reset by peer 1320001142 Q * ghislain Quit: Leaving. 1320001776 Q * derjohn_foo Ping timeout: 480 seconds 1320003977 Q * hijacker_ Quit: Leaving 1320009171 J * petzsch ~markus@p57B65B16.dip.t-dialin.net 1320010728 Q * sannes1 Remote host closed the connection 1320012096 J * clopez ~clopez@238.10.117.91.dynamic.mundo-r.com 1320012500 Q * petzsch Quit: Leaving. 1320012926 J * petzsch ~markus@p57B6652A.dip.t-dialin.net 1320015305 J * Aiken ~Aiken@2001:44b8:2168:1000:21f:d0ff:fed6:d63f 1320017100 Q * petzsch Quit: Leaving.