Bug 6121 - Writing to a loopback mounted file, which is on a samba share, fails (No writable handles for inode)
Writing to a loopback mounted file, which is on a samba share, fails (No writ...
Status: RESOLVED WORKSFORME
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
2.6
x86 Linux
: P3 major
: ---
Assigned To: Steve French
http://ubuntuforums.org/showthread.ph...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-18 12:02 UTC by Jan-Marek Glogowski
Modified: 2010-11-12 06:49 UTC (History)
1 user (show)

See Also:


Attachments
Handle SMB legacy fallback on write request (4.56 KB, patch)
2010-11-12 06:47 UTC, Jan-Marek Glogowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2009-02-18 12:02:32 UTC
Server + Client = Debian Etch
Also tested CifsVFS 2.6.29-git a9ac49d

I'm trying to sync a local directory to a loopback mounted file on a samba share using rsync. This is done by 

- Mounting the share
- Create the file on the share
- Setup a loopback device using the file
- Create ext3 on the loopback device
- Mount the loopback ext3
- Rsync local directory to loopback mount
- Umount loopback
- Remove loopback
- Umount share

When mounting the share and file again, the filesystem in the file is valid, but it's empty. In dmesg and syslog I get:

CIFS VFS: No writable handles for inode

You can find the commands to reproduce the problem in the linked thread.
Comment 1 Shirish S. Pargaonkar 2009-03-13 12:08:58 UTC
I do not see this problem with 1.54 of cifs module, there is nothing logged
in syslog buffer.
The files are not lost as well.


cifstest8:~ # ls -l /mnt/backup
total 0
cifstest8:~ # mount -t cifs //idsc0/idsc0 /mnt/smb_a -o user=root,pass=password                                                                                           root,pass=root
cifstest8:~ # losetup /dev/loop0 /mnt/smb_a/driveimage
cifstest8:~ # mount /dev/loop0 /mnt/backup
cifstest8:~ # cp /etc/motd /mnt/backup/motd.4
cifstest8:~ #
cifstest8:~ # mkdir /mnt/backup/newdir
cifstest8:~ # ls -l /mnt/backup
total 20
-rw-r--r-- 1 root root     0 Mar 13 11:40 ff1
drwx------ 2 root root 16384 Mar 13 11:38 lost+found
-rw-r--r-- 1 root root     0 Mar 13 11:42 motd
-rw-r--r-- 1 root root     0 Mar 13 11:55 motd.2
-rw-r--r-- 1 root root     0 Mar 13 11:57 motd.3
-rw-r--r-- 1 root root     0 Mar 13 12:00 motd.4
drwxr-xr-x 2 root root  4096 Mar 13 12:00 newdir
cifstest8:~ # umount /mnt/backup
cifstest8:~ # losetup -d /dev/loop0
cifstest8:~ # umount /mnt/smb_a
cifstest8:~ # ls -l /mnt/backup
total 0

cifstest8:~ # dmesg
kjournald starting.  Commit interval 5 seconds
EXT3 FS on loop0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Comment 2 Shirish S. Pargaonkar 2009-07-21 19:23:41 UTC
Do you think this problem still exists? I am not able to recreate it
with the steps listed to reproduce it.
Comment 3 Steve French 2009-08-24 18:27:33 UTC
No response from originator.  Please reopen if you can now reproduce it. We have not been able to reproduce this.
Comment 4 Jan-Marek Glogowski 2010-11-12 06:47:55 UTC
Created attachment 6066 [details]
Handle SMB legacy fallback on write request
Comment 5 Jan-Marek Glogowski 2010-11-12 06:49:30 UTC
I have had the problem again with Kernel 2.6.32.

A backported 2.6.36 CIFS module fixed the problem.

I also had to apply the attached patch for old legacy SMB write support, to fix locking problems with NetApp and PC Netlink servers.