From veatwell at ahl.com Fri Mar 2 16:36:11 2012 From: veatwell at ahl.com (Eatwell, Vladimir (London)) Date: Fri, 2 Mar 2012 16:36:11 +0000 Subject: Strange behaviour during file rename Message-ID: http://stackoverflow.com/questions/9535653/file-rename-on-ext3-appears-to-break-posix-spec I posted the above to stackoverflow - I am running a test does repeated file renames to a target file in one thread, and repeatedly reads that target file in another thread. This works fine except when there is a hard-link to the file being renamed to the target file. In this case the reading thread hits file not found errors (not always but often). This seems to break the sped for 'rename'. The test is: #!/bin/bash touch target; for ((i=0; i < 1000; i=i+1)); do echo "snafu$i" > $1/file$i; ln $1/file$i $1/link$i mv -f $1/file$i $1/target; done; and the reading side: #!/bin/bash while(true);do cat $1/target; done if the linking step is removed from the writing thread, then no errors are seen as expected. Does anyone know why the presence of the link causes read errors during the rename? I tried creating all the temporary files and links first, then pausing and then doing the rename loop - same erros are seen on the reading side. Thanks. This email has been sent by a member of the Man group (?Man?). Man?s parent company, Man Group plc, is registered in England and Wales (company number 2921462) at Riverbank House, 2 Swan Lane, London, EC4R 3AD. The contents of this email are for the named addressee(s) only. It contains information which may be confidential and privileged. If you are not the intended recipient, please notify the sender immediately, destroy this email and any attachments and do not otherwise disclose or use them. Email transmission is not a secure method of communication and Man cannot accept responsibility for the completeness or accuracy of this email or any attachments. Whilst Man makes every effort to keep its network free from viruses, it does not accept responsibility for any computer virus which might be transferred by way of this email or any attachments. This email does not constitute a request, offer, recommendation or solicitation of any kind to buy, subscribe, sell or redeem any investment instruments or to perform other such transactions of any kind. Man reserves the right to monitor, record and retain all electronic and telephone communications through its network in accordance with applicable laws and regulations. --UwQe9f5k7pI3vplngP -------------- next part -------------- An HTML attachment was scrubbed... URL: From lakshmipathi.g at gmail.com Wed Mar 7 09:06:01 2012 From: lakshmipathi.g at gmail.com (Lakshmipathi.G) Date: Wed, 7 Mar 2012 14:36:01 +0530 Subject: Strange behaviour during file rename In-Reply-To: References: Message-ID: Hi - I tried the scripts you have provided on ext3 FS. But I was unable to reproduce your issue (ran them simultaneously). Can you run the script with debugging mode "set -x" and see what going wrong ? -- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in -------------- next part -------------- An HTML attachment was scrubbed... URL: From veatwell at ahl.com Wed Mar 7 11:20:46 2012 From: veatwell at ahl.com (Eatwell, Vladimir (London)) Date: Wed, 7 Mar 2012 11:20:46 +0000 Subject: Strange behaviour during file rename In-Reply-To: References: Message-ID: Hi, Thank you for taking the time to look at this - I think I was hitting this bug: https://bugzilla.redhat.com/show_bug.cgi?id=438076. Thanks again, Vlad From: Lakshmipathi.G [mailto:lakshmipathi.g at gmail.com] Sent: 07 March 2012 09:06 To: Eatwell, Vladimir (London) Cc: ext3-users at redhat.com Subject: Re: Strange behaviour during file rename Hi - I tried the scripts you have provided on ext3 FS. But I was unable to reproduce your issue (ran them simultaneously). Can you run the script with debugging mode "set -x" and see what going wrong ? -- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in This email has been sent by a member of the Man group (?Man?). Man?s parent company, Man Group plc, is registered in England and Wales (company number 2921462) at Riverbank House, 2 Swan Lane, London, EC4R 3AD. The contents of this email are for the named addressee(s) only. It contains information which may be confidential and privileged. If you are not the intended recipient, please notify the sender immediately, destroy this email and any attachments and do not otherwise disclose or use them. Email transmission is not a secure method of communication and Man cannot accept responsibility for the completeness or accuracy of this email or any attachments. Whilst Man makes every effort to keep its network free from viruses, it does not accept responsibility for any computer virus which might be transferred by way of this email or any attachments. This email does not constitute a request, offer, recommendation or solicitation of any kind to buy, subscribe, sell or redeem any investment instruments or to perform other such transactions of any kind. Man reserves the right to monitor, record and retain all electronic and telephone communications through its network in accordance with applicable laws and regulations. --UwQe9f5k7pI3vplngP -------------- next part -------------- An HTML attachment was scrubbed... URL: