From: abc abc <netlogin_99@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: rename problem on vfat file systems
Date: Thu, 21 Jun 2001 12:04:34 -0700 (PDT) [thread overview]
Message-ID: <20010621190434.82955.qmail@web9604.mail.yahoo.com> (raw)
Hi,
I have been having problems using rename system call
on vfat file systems. I have looked at the kernel code
and tried everything I could do to figure out what
might be going wrong. As a last resort I thought you
might be able to help me.
The /etc/fstab entry for the drive that I mount looks
like this
/dev/sdc1 /mnt/sns-c vfat noauto,sync,user 0 0
here's the code snippet of what I am trying to do
int copy_seg_file(char *segFile)
{
char command[128];
sprintf(command, "cp %s /mnt/sns-c/tmp/segfile",
*segFile);
system(command);
sync();
rename("/mnt/sns-c/tmp/segfile",
"/mnt/sns-c/segments/segfile");
printf("file copied\n");
}
initially the file is copied to the temporary
directory to deal with the power outage during the
file copy. Once the file is completely copied, it will
be renamed to the final destination.
If I reboot the machine just after the rename() call
is completed, when the machine comes up the file
/mnt/sns-c/segments/segfile has zero bytes and there
is no file in the tmp directory. Effectively the file
is lost some where. Running fsck recovers the file,
but it doesn't help me much because I would be copying
hundreds of files and its difficult to match the
files.
Can you think of any thing that might be causing this.
Any help is highly appreciated.
Thanks,
Kumar
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
next reply other threads:[~2001-06-21 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-21 19:04 abc abc [this message]
2001-06-21 19:12 ` Alexander Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010621190434.82955.qmail@web9604.mail.yahoo.com \
--to=netlogin_99@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®