linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CIFS: Rename bug on servers not supporting inode numbers
@ 2011-11-03 15:20 Anton Altaparmakov
  2011-11-03 15:42 ` Anton Altaparmakov
  2011-11-04 11:16 ` Björn JACKE
  0 siblings, 2 replies; 14+ messages in thread
From: Anton Altaparmakov @ 2011-11-03 15:20 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs, samba-technical, LKML, Unix Support

Hi,

Our CIFS server problems seem to have no end…  The Novell CIFS server does not support server inode numbers (when I try the mount option I get the message it is being turned off as server does not support it) and thus each inode gets a different number each time it is accessed and it gets a different number again for each readdir call.

The fun happens with rename() when the rename source and target only differ in case, e.g.

	touch foo
	mv foo Foo

The result?  Because of the difference in inode numbers, the request gets through to the CIFS module which promptly does:

	cifs_unlink(target_dir, target_dentry)
	rc = cifs_do_rename(…)

And because the cifs_unlink() just removed the source of the rename (as it is the same as the target), "rc" comes back as -ENOENT.

And indeed the file is gone so we just lost the user's file for ever.  )-:

We are tossing around ideas how to fix this but we would be interested in your input as to what you think the fix should be.

In any case this probably should be fixed in the standard kernel CIFS module, too, and not just for us locally as this presumably affects anyone who is using the CIFS module against case-insensitive, non-server-inode-number-supporting CIFS servers...

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-11-28  7:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-03 15:20 CIFS: Rename bug on servers not supporting inode numbers Anton Altaparmakov
2011-11-03 15:42 ` Anton Altaparmakov
2011-11-03 17:40   ` Jeff Layton
2011-11-03 23:25     ` Anton Altaparmakov
2011-11-03 23:34       ` Steve French
2011-11-03 23:37         ` NamJae Jeon
2011-11-23 10:34           ` NamJae Jeon
2011-11-23 16:31             ` Alan Stern
2011-11-23 17:12               ` Alan Cox
2011-11-23 18:00                 ` Amit Sahrawat
2011-11-24  5:08                   ` Günter Kukkukk
2011-11-28  7:56                     ` Ashish Sangwan
2011-11-03 18:40   ` Shirish Pargaonkar
2011-11-04 11:16 ` Björn JACKE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).