[PVFS2-CVS] commit by walt in pvfs2/src/server: final-response.sm module.mk.in prelude.sm pvfs2-server.c pvfs2-server.h

CVS commit program cvs at parl.clemson.edu
Thu Jun 16 20:50:11 EDT 2005


Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv7247/src/server

Modified Files:
      Tag: WALT2
	final-response.sm module.mk.in prelude.sm pvfs2-server.c 
	pvfs2-server.h 
Log Message:
updates for adding extended attributes


Index: final-response.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/final-response.sm,v
diff -p -u -r1.20 -r1.20.10.1
--- final-response.sm	20 Jan 2005 14:51:02 -0000	1.20
+++ final-response.sm	16 Jun 2005 23:50:11 -0000	1.20.10.1
@@ -199,6 +199,10 @@ static __req_resp_type_desc_t s_req_resp
       "PVFS_SERV_MGMT_GET_DIRDATA_HANDLE" },
     { PVFS_SERV_JOB_TIMER, "PVFS_SERV_JOB_TIMER" },
     { PVFS_SERV_PROTO_ERROR, "PVFS_SERV_PROTO_ERROR" },
+    { PVFS_SERV_GETEATTR, "PVFS_SERV_GETEATTR" },
+    { PVFS_SERV_GETEATTR_LIST, "PVFS_SERV_GETEATTR_LIST" },
+    { PVFS_SERV_SETEATTR, "PVFS_SERV_SETEATTR" },
+    { PVFS_SERV_SETEATTR_LIST, "PVFS_SERV_SETEATTR_LIST" },
 };
 
 static void PINT_gossip_err_server_resp(

Index: module.mk.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/module.mk.in,v
diff -p -u -r1.43 -r1.43.10.1
--- module.mk.in	9 Feb 2005 18:46:30 -0000	1.43
+++ module.mk.in	16 Jun 2005 23:50:11 -0000	1.43.10.1
@@ -32,7 +32,11 @@ ifdef BUILD_SERVER
 		$(DIR)/proto-error.c \
 		$(DIR)/mgmt-remove-object.c \
 		$(DIR)/mgmt-remove-dirent.c \
-		$(DIR)/mgmt-get-dirdata-handle.c
+		$(DIR)/mgmt-get-dirdata-handle.c \
+		$(DIR)/get-eattr.c \
+		$(DIR)/get-eattr-list.c \
+		$(DIR)/set-eattr.c \
+		$(DIR)/set-eattr-list.c
 
 	# c files that should be added to server library
 	SERVERSRC += \

Index: prelude.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/prelude.sm,v
diff -p -u -r1.51 -r1.51.8.1
--- prelude.sm	21 Apr 2005 20:12:47 -0000	1.51
+++ prelude.sm	16 Jun 2005 23:50:11 -0000	1.51.8.1
@@ -234,14 +234,19 @@ static int prelude_perm_check(
             {
                 js_p->error_code = 0;
             }
-	    else if (s_op->req->op == PVFS_SERV_GETATTR)
+            /* for now we'll assume extended attribs are treated
+             * the same as regular attribs as far as permissions
+             */
+	    else if (s_op->req->op == PVFS_SERV_GETATTR ||
+                    s_op->req->op == PVFS_SERV_GETEATTR ||
+                    s_op->req->op == PVFS_SERV_GETEATTR_LIST)
 	    {
 		/* getting attributes is always ok -- permission
 		 * is checked on the parent directory at read time
 		 */
 		js_p->error_code = 0;
 	    }
-            else /* setattr */
+            else /* setattr, seteattr, seteattr_list */
             {
                 /*
                   NOTE: on other file systems, setattr doesn't

Index: pvfs2-server.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.c,v
diff -p -u -r1.178 -r1.178.10.1
--- pvfs2-server.c	28 Mar 2005 18:32:43 -0000	1.178
+++ pvfs2-server.c	16 Jun 2005 23:50:11 -0000	1.178.10.1
@@ -1570,6 +1570,18 @@ static void init_req_table(void)
             OP_CASE(PVFS_SERV_MGMT_EVENT_MON, "mgmt_event_mon", 
                     PINT_SERVER_CHECK_NONE,
                     PINT_SERVER_ATTRIBS_REQUIRED, &pvfs2_event_mon_sm);
+            OP_CASE(PVFS_SERV_GETEATTR, "geteattr",
+                    PINT_SERVER_CHECK_ATTR,
+                    PINT_SERVER_ATTRIBS_NOT_REQUIRED, &pvfs2_get_eattr_sm);
+            OP_CASE(PVFS_SERV_GETEATTR_LIST, "geteattr_list",
+                    PINT_SERVER_CHECK_ATTR,
+                    PINT_SERVER_ATTRIBS_NOT_REQUIRED, &pvfs2_get_eattr_list_sm);
+            OP_CASE(PVFS_SERV_SETEATTR, "seteattr",
+                    PINT_SERVER_CHECK_ATTR,
+                    PINT_SERVER_ATTRIBS_NOT_REQUIRED, &pvfs2_set_eattr_sm);
+            OP_CASE(PVFS_SERV_SETEATTR_LIST, "seteattr_list",
+                    PINT_SERVER_CHECK_ATTR,
+                    PINT_SERVER_ATTRIBS_NOT_REQUIRED, &pvfs2_set_eattr_list_sm);
             OP_CASE(PVFS_SERV_JOB_TIMER, "job_timer",
                     PINT_SERVER_CHECK_INVALID,
                     PINT_SERVER_ATTRIBS_REQUIRED, &pvfs2_job_timer_sm);

Index: pvfs2-server.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.h,v
diff -p -u -r1.115 -r1.115.12.1
--- pvfs2-server.h	21 Dec 2004 14:54:52 -0000	1.115
+++ pvfs2-server.h	16 Jun 2005 23:50:11 -0000	1.115.12.1
@@ -256,6 +256,12 @@ struct PINT_server_getattr_op
     PVFS_fs_id fs_id;
     uint32_t attrmask;
 };
+
+/* this is used in both set_eattr_list and get_eattr_list */
+struct PINT_server_eattr_list_op
+{
+    void *buffer;
+};
     
 /* This structure is passed into the void *ptr 
  * within the job interface.  Used to tell us where
@@ -313,6 +319,7 @@ typedef struct PINT_server_op
     union
     {
 	/* request-specific scratch spaces for use during processing */
+        struct PINT_server_eattr_list_op eattr_list;
         struct PINT_server_getattr_op getattr;
 	struct PINT_server_getconfig_op getconfig;
 	struct PINT_server_lookup_op lookup;
@@ -369,6 +376,10 @@ extern struct PINT_state_machine_s pvfs2
 extern struct PINT_state_machine_s pvfs2_perf_mon_sm;
 extern struct PINT_state_machine_s pvfs2_event_mon_sm;
 extern struct PINT_state_machine_s pvfs2_iterate_handles_sm;
+extern struct PINT_state_machine_s pvfs2_get_eattr_sm;
+extern struct PINT_state_machine_s pvfs2_get_eattr_list_sm;
+extern struct PINT_state_machine_s pvfs2_set_eattr_sm;
+extern struct PINT_state_machine_s pvfs2_set_eattr_list_sm;
 
 /* nested state machines */
 extern struct PINT_state_machine_s pvfs2_get_attr_work_sm;



More information about the PVFS2-CVS mailing list