Wrong name when upper filter calls FltReissueSynchronousIo after STATUS_REPARSE

Hi,

In some scenarios, I return STATUS_REPARSE and change the FO’s filename as expected but the upper driver calls FltReissueSynchronousIo on its PostCreate.

When that calls reaches again my driver, I see the changed name instead of the original requested one.

Cannot use context objects because FO is not open. Cannot use ECP because the I/O can have no ECP list attached (and if attach a new one, I might not be able to free it later)

Is there some way to know how to obtain the original request name?

Regards,
Mauro.

> In some scenarios, I return STATUS_REPARSE and change the FO’s filename as

expected but the upper driver calls FltReissueSynchronousIo on its
PostCreate.

When that calls reaches again my driver, I see the changed name instead of
the original requested one.

I would say that that is expected.

Cannot use context objects because FO is not open. Cannot use ECP because
the I/O can have no ECP list attached (and if attach a new one, I might
not be able to free it later)

ECP addition and removal is very fully of magicke, but have you tried this?
In most cases I’ve seen the ECP_LIST and its contents are removed in the IO
manager. Its only ECPs added by a FltCreate which stay. But my memory is
vague, as is the documentation, but I would definitely try it.

Hi Rod,

The problem would be how will remove the ECP I add, if the upper driver does not reissue the I/O

If I’m right the behavior of ECP lists is the following:

If the request already has an ECP_LIST attached, if I add an item, it will be removed when the list is deleted.

BUT if the request has no list attached and I create one, it will leak because nobody will delete it.

Regards,
Mauro.

> BUT if the request has no list attached and I create one, it will leak

because nobody will delete it.

That’s not been my experience, but YMMV and it was some time ago when I last
tried it. Also my pattern is to add in pre, and so on…

In my shadow FO driver, when I call FltCreateFileEx, I have to create a temporary list, move the caller’s ECP parameters and add mines, do the call, then move back ECPs to the callers list and free my list that remains with my items.

If add my ECP to the caller’s list, no idea why, they were not freed and verifier complains when my driver shuts down.

It is ugly, but works.