xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 434] DM_EVENT_DESTROY not sent if non-existing attrib

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 434] DM_EVENT_DESTROY not sent if non-existing attribute requested
From: bugzilla-daemon@xxxxxxxxxxx
Date: Mon, 9 Jan 2006 04:52:34 -0800
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=434





------- Additional Comments From c.pascoe@xxxxxxxxxxxxxx  2006-01-09 04:52 CST 
-------
This minimal patch addresses the problem, permitting the event to be generated
in the case when there is no attribute, but not when a more serious error 
occurs.

Index: dmapi_event.c
===================================================================
RCS file: /cvs/linux-2.6-xfs/fs/dmapi/dmapi_event.c,v
retrieving revision 1.32
diff -u -p -U11 -r1.32 dmapi_event.c
--- dmapi_event.c       21 Oct 2005 21:29:59 -0000      1.32
+++ dmapi_event.c       9 Jan 2006 12:36:48 -0000
@@ -335,23 +335,23 @@ dm_send_destroy_event(
        /* If a return-on-destroy attribute name exists for this filesystem,
           see if the object being deleted has this attribute.  If the object
           doesn't have the attribute or if we encounter an error, then send
           the event without the attribute.
         */
 
        value_len = -1;         /* because zero is a valid attribute length */
        if (attrname.an_chars[0] != '\0') {
                fsys_vector = dm_fsys_vector(ip);
                error = fsys_vector->get_destroy_dmattr(ip, vp_right, &attrname,
                        &value, &value_len);
-               if (error)
+               if (error && error != -ENODATA)
                        return error;
        }
 
        /* Now that we know the size of the attribute value, if any, calculate
           the size of the event in bytes, create an event structure for it,
           and insert the handle into the event.
        */
 
        tevp = dm_evt_create_tevp(DM_EVENT_DESTROY,
                HANDLE_SIZE(tdp) + (value_len >= 0 ? value_len : 0),
                (void **)&destp);

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 434] DM_EVENT_DESTROY not sent if non-existing attribute requested, bugzilla-daemon <=