Thanks all. I think I will implement your approach Pete.
but do you really only want “Microsoft folk” to answer?
Gary, I appreciate very much answers from any folk. My reference to
Microsoft folks was only a hint as I think they can answer easily about
something that they own and which seems poorly documented.
Rollback after commit? how is this possible?
Maxim, I understand the pre-prepare for a transaction can be initiated
at any time. So I wonder if even from the context of a transacted
operation the following race condition may cause a bugcheck:
if (TmIsTransactionActive( FltObjects->Transaction )) {
//
// Rolls back a transaction on behalf of the
// minifilter.
//
/*At this moment anyone else can initiate the pre-prepare phase*/
FltRollbackEnlistment( FltObjects->Instance,
FltObjects->Transaction,
TransactionContext );
}
I will test this scenario. But if someone else may shed some light about
the correct way to use FltRollBackEnlistment routine I’d very much
appreciate it :). Maybe transactions were discussed in the latest IFS
plugfest?.
Thanks,
Ramon
On 08/28/2010 2:37, Peter Scott wrote:
On 8/27/2010 10:17 AM, xxxxx@edermind.com wrote:
> Hi all,
>
> This a question for Microsoft folks. Can a minifilter rollback a
> transaction calling FltRollbackEnlistment after the
> pre-prepare/prepare/commit sequence has been initiated?.
>
> Calling FltRollbackEnlistment from the
> TransactionNotificationCallback, at least during the pre-prepare and
> prepare phases causes a bugcheck due to access violation. This is
> reasonable as the transacion is rolled back in the pre-prepare phase
> and there was no way to tell the TxF to fail the pre-prepare.
>
> In order to rollback a transaction when it is in the pre-prepare
> phase, should the minifilter create its own volatile resource manager
> and enlist in the transction using it?.
>
Aside from Gary’s comments, since this is from a non-Microsoft-y …
The only successful approach I have implemented is where I create an RM
and control actions from that perspective. Outside of this realm,
processing requests in any other manner than inspection has resulted in
varying degrees of success.
Pete
> Thanks,
> Ramon
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer