IRP_MJ_CLOSE before IRP_MJ_CREATE completes?

I’m seeing something in my filter driver that I don’t
expect to be able to happen and I’m just wondering if
this is normal or if I’m looking at it wrong.

  1. A create request comes in to my dispatch routine
    for a directory.

  2. The request is farmed off to a worker thread and
    STATUS_PENDING is returned. (I also tried not pending
    the request and I saw the same behavior)

  3. The worker thread passes the irp on by calling the
    lower driver.

  4. I see a IRP_MJ_CLOSE in the dispatch routine for
    the same file object that is in the IRP_MJ_CREATE
    request.

  5. I see a IRP_MJ_CLOSE in the completion routine for
    the same file object that is in the IRP_MJ_CREATE
    request.

  6. I see the completion of the IRP_MJ_CREATE request
    with the same File Object.

What’s going on here?

Thanks in advance,

Randy


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

What is that stack trace when your filter gets the close? That will tell
you who and why is generating it.

Randy Cook wrote:

I’m seeing something in my filter driver that I don’t
expect to be able to happen and I’m just wondering if
this is normal or if I’m looking at it wrong.

  1. A create request comes in to my dispatch routine
    for a directory.

  2. The request is farmed off to a worker thread and
    STATUS_PENDING is returned. (I also tried not pending
    the request and I saw the same behavior)

  3. The worker thread passes the irp on by calling the
    lower driver.

  4. I see a IRP_MJ_CLOSE in the dispatch routine for
    the same file object that is in the IRP_MJ_CREATE
    request.

  5. I see a IRP_MJ_CLOSE in the completion routine for
    the same file object that is in the IRP_MJ_CREATE
    request.

  6. I see the completion of the IRP_MJ_CREATE request
    with the same File Object.

What’s going on here?

Thanks in advance,

Randy


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Nick Ryan (MVP for DDK)

Is it wise to change the context of a IRP_MJ_CREATE in a file system filter
driver? You forgot to say what file system is the target.

“Randy Cook” wrote in message news:xxxxx@ntfsd…
>
> I’m seeing something in my filter driver that I don’t
> expect to be able to happen and I’m just wondering if
> this is normal or if I’m looking at it wrong.
>
> 1. A create request comes in to my dispatch routine
> for a directory.
>
> 2. The request is farmed off to a worker thread and
> STATUS_PENDING is returned. (I also tried not pending
> the request and I saw the same behavior)
>
> 3. The worker thread passes the irp on by calling the
> lower driver.
>
> 4. I see a IRP_MJ_CLOSE in the dispatch routine for
> the same file object that is in the IRP_MJ_CREATE
> request.
>
> 5. I see a IRP_MJ_CLOSE in the completion routine for
> the same file object that is in the IRP_MJ_CREATE
> request.
>
> 6. I see the completion of the IRP_MJ_CREATE request
> with the same File Object.
>
> What’s going on here?
>
> Thanks in advance,
>
> Randy
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
>

I have seen many dire warnings here from the
experienced about pending creates. And I believe
them. That’s why I can easily switch my stuff back
and forth. Interestly enough, I haven’t seen any
problems yet, even at the last plugfest. But, from
what you guys have said, I believe the problems are
out there.

The FS is NTFS (Windows XP). I noticed this wierdness
during an install of MS Office XP. Maybe it happens
all the time?

This isn’t causing me problems or anything, it’s just
that I’m trying to learn how this stuff works and when
I got a close on a file object before the create was
done, it seemed really strange to me.

Anyway, when I get more time I’ll research it some
more. I was just hoping someone could say, “Yes
newbie that’s normal, don’t worry about it”.

Thanks for your time,

— “David J. Craig” wrote:
> Is it wise to change the context of a IRP_MJ_CREATE
> in a file system filter
> driver? You forgot to say what file system is the
> target.
>
> “Randy Cook” wrote in message
> news:xxxxx@ntfsd…
> >
> > I’m seeing something in my filter driver that I
> don’t
> > expect to be able to happen and I’m just wondering
> if
> > this is normal or if I’m looking at it wrong.
> >
> > 1. A create request comes in to my dispatch
> routine
> > for a directory.
> >
> > 2. The request is farmed off to a worker thread
> and
> > STATUS_PENDING is returned. (I also tried not
> pending
> > the request and I saw the same behavior)
> >
> > 3. The worker thread passes the irp on by calling
> the
> > lower driver.
> >
> > 4. I see a IRP_MJ_CLOSE in the dispatch routine
> for
> > the same file object that is in the IRP_MJ_CREATE
> > request.
> >
> > 5. I see a IRP_MJ_CLOSE in the completion routine
> for
> > the same file object that is in the IRP_MJ_CREATE
> > request.
> >
> > 6. I see the completion of the IRP_MJ_CREATE
> request
> > with the same File Object.
> >
> > What’s going on here?
> >
> > Thanks in advance,
> >
> > Randy
> >
> >
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Ok, thanks Nick. I’ll take a look at it when I get
back in the office.

I expect that it will be the MSI installer, since I
was doing an Office XP install. But, I’ll verify.

Just thinking about this, I wonder if there is some
optimized path for just ensuring that a directory
exists?

— Nick Ryan wrote:
> What is that stack trace when your filter gets the
> close? That will tell
> you who and why is generating it.
>
> Randy Cook wrote:
>
> > I’m seeing something in my filter driver that I
> don’t
> > expect to be able to happen and I’m just wondering
> if
> > this is normal or if I’m looking at it wrong.
> >
> > 1. A create request comes in to my dispatch
> routine
> > for a directory.
> >
> > 2. The request is farmed off to a worker thread
> and
> > STATUS_PENDING is returned. (I also tried not
> pending
> > the request and I saw the same behavior)
> >
> > 3. The worker thread passes the irp on by calling
> the
> > lower driver.
> >
> > 4. I see a IRP_MJ_CLOSE in the dispatch routine
> for
> > the same file object that is in the IRP_MJ_CREATE
> > request.
> >
> > 5. I see a IRP_MJ_CLOSE in the completion routine
> for
> > the same file object that is in the IRP_MJ_CREATE
> > request.
> >
> > 6. I see the completion of the IRP_MJ_CREATE
> request
> > with the same File Object.
> >
> > What’s going on here?
> >
> > Thanks in advance,
> >
> > Randy
> >
> >
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> >
> >
> >
>
> –
> Nick Ryan (MVP for DDK)
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com