Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   EXT3 Users (http://www.linux-archive.org/ext3-users/)
-   -   Strange behaviour during file rename (http://www.linux-archive.org/ext3-users/641247-strange-behaviour-during-file-rename.html)

"Eatwell, Vladimir (London)" 03-02-2012 03:36 PM

Strange behaviour during file rename
 
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


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

"Lakshmipathi.G" 03-07-2012 08:06 AM

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

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

"Eatwell, Vladimir (London)" 03-07-2012 10:20 AM

Strange behaviour during file rename
 
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@gmail.com]
Sent: 07 March 2012 09:06
To: Eatwell, Vladimir (London)
Cc: ext3-users@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


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users


All times are GMT. The time now is 12:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.