[cifs-protocol] Two new MS-FRS1 issues from Matthieu Patou re "Locking"

Edgar Olougouna edgaro at microsoft.com
Wed Oct 12 14:52:55 MDT 2011


Matthieu,

Please find the answer to question 1 as follows. I will provide the answer to question 2 soon.

=== 1 ===

What happens at DC2 if a third system tries to lock the file between the time that DC2 notified DC1 "Accept the change from DC1) and when and the file has been downloaded (staged) and install it in the destination directory?

Answer:

The FRS upstream partner holds an exclusive oplock on the source file while *generating the staging file*. Once the staging file has been created, it releases the oplock handle. 
Any further change to the source file will be reflected in subsequent change orders.  
That being said, it is possible that FRS cannot generate the staging file to be replicated if it encountered a sharing violation. For example, if another entity has opened the source file with 0 as the sharing mode parameter, or has opened the file with an exclusive lock, then FRS will not be able to open it for read access and will encounter a sharing violation, and as a result will not be able to generate the staging file. 
On the downstream partner, if the target file - to be replaced - on the destination was opened, then FRS would not override the "old" file and replication would be blocked, unless the "install override" feature is enabled (frsFlags). The frsFlags attribute is documented in MS-FRS1 2.3.1.2   NTFRS Replica Set Object.

Additional references:
FRS Encounters "ERROR_SHARING_VIOLATION" Errors When It Tries to Replicate Data That Is Still in Use
http://support.microsoft.com/kb/822300
How to configure the File Replication Service to allow fewer sharing violations that block replication
http://support.microsoft.com/kb/816493

Regards,
Edgar

-----Original Message-----
From: Edgar Olougouna 
Sent: Tuesday, September 20, 2011 3:52 PM
To: 'mat at samba.org'; pfif at tridgell.net; cifs-protocol at samba.org
Subject: RE: Two new MS-FRS1 issues from Matthieu Patou re "Locking"

[Dochelp to bcc]

Thanks Matthieu for this input, I will investigate and follow up.

Regards,
Edgar

-----Original Message-----
From: Matthieu Patou [mailto:mat at samba.org] 
Sent: Tuesday, September 20, 2011 3:48 PM
To: Edgar Olougouna; Interoperability Documentation Help; pfif at tridgell.net; cifs-protocol at samba.org
Subject: Re: Two new MS-FRS1 issues from Matthieu Patou re "Locking"

Hello Edgar,

Initial testing seems to indicate that when trying to install a staged file FRS obey to lock. It might help you to orientate your work.

Matthieu.
On 20/09/2011 13:45, Edgar Olougouna wrote:
> [Bcc Bryan]
>
> Matthieu,
>
> I am taking care of these questions. I will update you as soon as I have news.
>
> Thanks,
> Edgar
>
> From: Bryan Burgin
> Sent: Monday, September 19, 2011 5:24 PM
> To: mat at samba.org
> Subject: RE: Two new MS-FRS1 issues from Matthieu Patou re "Locking"
>
> [Protocol team on bcc]
>
> Matthieu,
>
> Below are the case numbers for each of these issues.
> Someone from the team will contact you soon.
>
> 111091980340447
> 111091980132344
>
> B.
>
> From: Bryan Burgin
> Sent: Monday, September 19, 2011 1:17 PM
>
> Subject: Two new MS-FRS1 issues from Matthieu Patou re "Locking"
>
>
>
> mat at samba.org<mailto:mat at samba.org>
>
> === 1 ===
>
> What happens at DC2 if a third system tries to lock the file between the time that DC2 notified DC1 "Accept the change from DC1) and when and the file has been downloaded (staged) and install it in the destination directory?
>
> === 2 ===
>
> Locking...
>
> Given DC1&  DC2.  File is on both systems.  From DC1...
>
> DC1 sends remote Co Command to DC2 to notify of a change...
>
> DC2 accepts the change (by responding with "Send Stage"
>
> ...what would prevents the file from being modified by DC2 while DC1 is syncing?
>
>


--
Matthieu Patou
Samba Team
http://samba.org




More information about the cifs-protocol mailing list