public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: junjiec@gmail.com
To: hirofumi@mail.parknet.co.jp
Cc: smartart@tiscali.it, linux-kernel@vger.kernel.org
Subject: Re: bug? VFAT copy problem
Date: Thu, 23 Nov 2006 12:50:47 +0900 (JST)	[thread overview]
Message-ID: <45651ad4.562a64ed.0e8d.ffffd499@mx.google.com> (raw)
In-Reply-To: <87mz6kajks.fsf@duaron.myhome.or.jp>

Hi,

We encountered this problem before,it did being caused by dcache.
When creating files, VFS would check the dcache first and pass the dentry
it found there to vfat_create(). Instead of dentry , using the path info
passed by user solved the problem.

--- namei.c	2006-11-18 18:41:58.000000000 +0900
+++ namei.c.new	2006-11-23 12:45:34.000000000 +0900
@@ -742,7 +742,7 @@
 	lock_kernel();
 
 	ts = CURRENT_TIME_SEC;
-	err = vfat_add_entry(dir, &dentry->d_name, 0, 0, &ts, &sinfo);
+	err = vfat_add_entry(dir, &nd->last, 0, 0, &ts, &sinfo);
 	if (err)
 		goto out;
 	dir->i_version++;



From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: bug? VFAT copy problem
Date: Wed, 22 Nov 2006 00:46:43 +0900

> The Peach <smartart@tiscali.it> writes:
> 
> > On Tue, 21 Nov 2006 02:32:43 +0900
> > OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
> >
> >> I couldn't reproduce this for now. Could you tell mount options which
> >> you used? and after mount, "cat /proc/mounts", please.
> >
> > # mount | grep vfat 
> > /dev/sdb1 on /mnt/iomega type vfat (rw,uid=1000,gid=100,codepage=850,iocharset=iso8859-15) 
> >
> > it seems only related to those kind of files, but I don't know how to inspect the "file properties" and why these files behave like this.
> > As you can see and with a strace made on cp, the files _seems_ to be copied with the correct case, whilst it isn't, as seen with "ls". This and other things let me think is a vfat problem.
> 
> Hmm... This may be the dentry cache handling problem of fat.
> 
> Can you try the attached debug patch? And if you comment-in the
> following parts, does this problem fix?
> 
> @@ -787,6 +830,9 @@ static int vfat_rmdir(struct inode *dir,
>  	clear_nlink(inode);
>  	inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
>  	fat_detach(inode);
> +	/* need to revalidate for next create */
> +	table = (sbi->options.name_check == 's') ? 3 : 1;
> +//	dentry->d_op = &vfat_dentry_ops[table];
> @@ -811,6 +858,9 @@ static int vfat_unlink(struct inode *dir
>  	clear_nlink(inode);
>  	inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
>  	fat_detach(inode);
> +	/* need to revalidate for next create */
> +	table = (sbi->options.name_check == 's') ? 3 : 1;
> +//	dentry->d_op = &vfat_dentry_ops[table];
> -- 
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> 

  parent reply	other threads:[~2006-11-23  3:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-20 15:42 bug? VFAT copy problem The Peach
2006-11-20 17:32 ` OGAWA Hirofumi
2006-11-20 17:49   ` The Peach
2006-11-21 15:46     ` OGAWA Hirofumi
2006-11-22 14:02       ` [OT] " Sergio Monteiro Basto
2006-11-22 14:53         ` DervishD
2006-11-22 16:07           ` OGAWA Hirofumi
2006-11-22 18:21             ` DervishD
2006-11-23  0:56           ` Sergio Monteiro Basto
2006-11-23  9:13             ` DervishD
2006-11-23 11:26               ` The Peach
2006-11-23 15:43                 ` DervishD
2006-11-23 11:38               ` OGAWA Hirofumi
2006-11-23 11:50                 ` [OT] " Renato S. Yamane
2006-11-23 11:59                   ` OGAWA Hirofumi
2006-11-23 19:21                     ` Sergio Monteiro Basto
2006-11-22 15:30       ` The Peach
2006-11-22 16:15         ` OGAWA Hirofumi
2006-11-22 19:10           ` The Peach
2006-11-22 19:29             ` OGAWA Hirofumi
2006-11-22 19:38               ` The Peach
2006-11-22 19:51                 ` OGAWA Hirofumi
2006-11-22 22:21                   ` The Peach
2006-11-23 11:32                     ` OGAWA Hirofumi
2006-11-23  3:50       ` junjiec [this message]
2006-11-23 11:08         ` OGAWA Hirofumi

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=45651ad4.562a64ed.0e8d.ffffd499@mx.google.com \
    --to=junjiec@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smartart@tiscali.it \
    /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