"ronnie sahlberg" <ronniesahlberg@xxxxxxxxx> writes: > You also have the magic happening in: > -#define CIFS_CACHE_READ(cinode) (cinode->oplock & CIFS_CACHE_READ_FLG) > +#define CIFS_CACHE_READ(cinode) ((cinode->oplock & > CIFS_CACHE_READ_FLG) || > (CIFS_SB(cinode->vfs_inode.i_sb)->mnt_cifs_flags & > CIFS_MOUNT_RO_CACHE)) Ah thanks, I didn't notice that part. > which makes things work. Still I would want this to be driven by > whether the server returns "this share is WRITEABLE or not" flag > instead of a mount option. > A mount option only invites people to "I use this because it makes > thing faster" then "why do my files look corrupted sometimes" ? That's true but there are situations where it would be handy. Imagine mounting //host/non_ro_share/sub/path/ro_folder i.e. mounting a folder that you know won't change within a share that can change. I guess this hints at a more granular cache mode. Cheers, -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)