Hi folks,
I hope this is the right place to ask why i can't seem to get
DM_USER_EVENT messages via calls to dm_get_events. I've been struggling
with it in my code for a few days so i decided to checkout the testsuite
and try it. The testsuite i'm using was checked out yesterday, and the
kernel is from (roughly) a month ago.
Here's the order of things:
<reboot>
I start up 'print_event' from the testsuite:
# ./print_event -R /home/dative/dmapp/mnt
(in another shell) i unmount the filesystem i'm using for a test:
# umount /home/dative/dmapp/mnt
here's the line from my fstab:
/home/dative/dmapp/testfs.xfs /home/dative/dmapp/mnt xfs
loop,quota,dmapi,mtpt=/home/dative/dmapp/mnt 0 0
Then i remount it:
# mount /home/dative/dmapp/mnt
...and try to send a message with 'create_userevent' (from the suite):
# ./create_userevent -s 1 "hello, world"
New token 5
#
but the user event isn't printed out by 'print_event'. this is the total
output:
preunmount: token 1 sequence 1
fs handle 8baa21bc1029db24
root dir 8baa21bc1029db240e00000000000000804b000000000000
unmount mode NOFORCE
unmount: token 2 sequence 2
fs handle 8baa21bc1029db24
unmount mode NOFORCE
retcode 0
mount: token 3 sequence 3
fs handle 8baa21bc1029db24
mtpt handle <BAD HANDLE, hlen 0> *
mtpt path /home/dative/dmapp/mnt
media desig loop(7,0)
root handle 8baa21bc1029db240e00000000000000804b000000000000
mode 0
* because i didn't mount that xfs fs with the dmapi options?
in my application i am able to get the user event and corresponding
message via dm_getall_tokens and then a dm_find_eventmsg, but not via
dm_get_events. my understanding (from the dmapi document) is that i
should be able to get userevents via dm_get_events**. have i missed
something?
thanks and regards,
-ben
** i think that it may have been working about a week ago. i had set an
eventlist on a file and then was able to get userevents via
dm_get_events, but am not sure. i'll check on that.
|