xfs
[Top] [All Lists]

Re: Not getting CREATE events from dmapi

To: jgl@xxxxxxxxxxxxxx
Subject: Re: Not getting CREATE events from dmapi
From: Dean Roehrich <roehrich@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2004 15:49:27 -0600
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
>From:  John Groves <jgl@xxxxxxxxxxxxxx>
>I'm doing a dmapi handler, and I'm not receiving any DM_EVENT_CREATE or 
>DM_EVENT_POSTCREATE events.  Other events are delivered as expected 
>(including the other async POST-whatever events and the managed region 
>events).  Just wondering if there are any known issues around this.

Maybe an example would be useful.  Here's how you might use the dmapi test
suite, under the userspace CVS tree xfs-cmds/xfstests/dmapi on oss.sgi.com, to
test this:

First, how to place the CREATE event on the fshandle.  This is not persistent
across mounts:

# dm_create_session
ret=0
newsid=2
# path_to_fshandle /mnts/dmi3
819bbace559f0be3
# set_disp -s 2 819bbace559f0be3 DM_EVENT_CREATE DM_EVENT_READ
# set_eventlist -F -s 2 819bbace559f0be3 DM_EVENT_CREATE
(someone else creates a file now...)
# get_events 2
rlenp is 96
create: token=6 sequence=6
        parent dir      819bbace559f0be3000e0000000000000000000000000040
        name            foo
        mode bits       mode 100644: perm     rw- r-- r--, type Regular File
# respond_event 2 6 1 0                                    


# umount /mnts/dmi3
# mount /mnts/dmi3

# get_eventlist -F -s 2 819bbace559f0be3
Events on object 819bbace559f0be3 (0x0), nelemp 23:


Now, to place the CREATE event on the directory.  This is persistent across
mounts:

# path_to_handle /mnts/dmi3
819bbace559f0be3000e0000000000000000000000000040
# set_disp -s 2 819bbace559f0be3000e0000000000000000000000000040 DM_EVENT_CREATE
# set_eventlist -s 2 819bbace559f0be3000e0000000000000000000000000040 
DM_EVENT_CREATE
(someone else creates a file now...)
# get_events 2
rlenp is 96
create: token=7 sequence=7
        parent dir      819bbace559f0be3000e0000000000000000000000000040
        name            spam
        mode bits       mode 100644: perm     rw- r-- r--, type Regular File
# respond_event 2 7 1 0                                    


Anyway, if you could reproduce it with the dmapi test suite, that would be
especially useful.  You might have to get a current version of the test suite
that lets you specify handles rather than pathnames to commands such as
set_disp and set_eventlist.  (Your handles will look different--my examples
are MIPS-order.)


Dean


<Prev in Thread] Current Thread [Next in Thread>