nfs-ganesha 1.4

mfsl_async_open_by_name.c

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Copyright CEA/DAM/DIF  (2008)
00005  * contributeur : Philippe DENIEL   philippe.deniel@cea.fr
00006  *                Thomas LEIBOVICI  thomas.leibovici@cea.fr
00007  *
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 3 of the License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022  *
00023  * ---------------------------------------
00024  */
00025 
00036 #ifdef HAVE_CONFIG_H
00037 #include "config.h"
00038 #endif
00039 
00040 /* fsal_types contains constants and type definitions for FSAL */
00041 #include "fsal_types.h"
00042 #include "fsal.h"
00043 #include "mfsl_types.h"
00044 #include "mfsl.h"
00045 #include "common_utils.h"
00046 
00047 fsal_status_t MFSL_open_by_name(mfsl_object_t * dirhandle,      /* IN */
00048                                 fsal_name_t * filename, /* IN */
00049                                 mfsl_object_t * filehandle,     /* IN */
00050                                 fsal_op_context_t * p_context,  /* IN */
00051                                 mfsl_context_t * p_mfsl_context,        /* IN */
00052                                 fsal_openflags_t openflags,     /* IN */
00053                                 fsal_file_t * file_descriptor,  /* OUT */
00054                                 fsal_attrib_list_t * file_attributes /* [ IN/OUT ] */ )
00055 {
00057   if(dirhandle->health != MFSL_ASYNC_SYNCHRONOUS)
00058     MFSL_return(ERR_FSAL_NO_ERROR, 0);
00059 
00060   return FSAL_open_by_name(&dirhandle->handle,
00061                            filename,
00062                            p_context, openflags, file_descriptor, file_attributes);
00063 }                               /* MFSL_open_by_name */