Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts lock/unlock callback signature to 1.8.21 version #254

Merged
merged 2 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 2 additions & 59 deletions src/H5FDhdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ static herr_t H5FD_hdfs_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, had
static herr_t H5FD_hdfs_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
static herr_t H5FD_hdfs_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_hdfs_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_hdfs_unlock(H5FD_t *_file);

static herr_t H5FD_hdfs_validate_config(const H5FD_hdfs_fapl_t *fa);

Expand Down Expand Up @@ -320,8 +318,8 @@ static const H5FD_class_t H5FD_hdfs_g = {
H5FD_hdfs_write, /* write */
NULL, /* flush */
H5FD_hdfs_truncate, /* truncate */
H5FD_hdfs_lock, /* lock */
H5FD_hdfs_unlock, /* unlock */
NULL, /* lock */
NULL, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};

Expand Down Expand Up @@ -1647,61 +1645,6 @@ H5FD_hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, h
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_hdfs_truncate() */

/*-------------------------------------------------------------------------
*
* Function: H5FD_hdfs_lock
*
* Purpose:
*
* Place an advisory lock on a file.
* No effect on Read-Only S3 file.
*
* Suggestion: remove lock/unlock from class
* would result in error at H5FD_[un]lock() (H5FD.c)
*
* Return:
*
* SUCCEED (No-op always succeeds)
*
* Programmer: Jacob Smith
* 2017-11-03
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_hdfs_lock(H5FD_t H5_ATTR_UNUSED *_file, hbool_t H5_ATTR_UNUSED rw)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR

FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_hdfs_lock() */

/*-------------------------------------------------------------------------
*
* Function: H5FD_hdfs_unlock
*
* Purpose:
*
* Remove the existing lock on the file.
* No effect on Read-Only S3 file.
*
* Return:
*
* SUCCEED (No-op always succeeds)
*
* Programmer: Jacob Smith
* 2017-11-03
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_hdfs_unlock(H5FD_t H5_ATTR_UNUSED *_file)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR

FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_hdfs_unlock() */

#else /* H5_HAVE_LIBHDFS */

/* No-op stubs to avoid binary compatibility problems with previous
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDpublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ typedef struct H5FD_class_t {
herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer);
herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, unsigned closing);
herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
herr_t (*lock)(H5FD_t *file, hbool_t last);
herr_t (*unlock)(H5FD_t *file);
herr_t (*lock)(H5FD_t *file, unsigned char *oid, unsigned lock_type, hbool_t last);
byrnHDF marked this conversation as resolved.
Show resolved Hide resolved
herr_t (*unlock)(H5FD_t *file, unsigned char *oid, hbool_t last);
H5FD_mem_t fl_map[H5FD_MEM_NTYPES];
} H5FD_class_t;

Expand Down
61 changes: 2 additions & 59 deletions src/H5FDros3.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ static herr_t H5FD_ros3_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, had
static herr_t H5FD_ros3_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
static herr_t H5FD_ros3_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_ros3_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_ros3_unlock(H5FD_t *_file);
static herr_t H5FD_ros3_validate_config(const H5FD_ros3_fapl_t *fa);
static void * H5FD_ros3_fapl_get(H5FD_t *_file);
static void * H5FD_ros3_fapl_copy(const void *_old_fa);
Expand Down Expand Up @@ -265,8 +263,8 @@ static const H5FD_class_t H5FD_ros3_g = {
H5FD_ros3_write, /* write */
NULL, /* flush */
H5FD_ros3_truncate, /* truncate */
H5FD_ros3_lock, /* lock */
H5FD_ros3_unlock, /* unlock */
NULL, /* lock */
NULL, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};

Expand Down Expand Up @@ -1575,59 +1573,4 @@ H5FD_ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, h
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_ros3_truncate() */

/*-------------------------------------------------------------------------
*
* Function: H5FD_ros3_lock()
*
* Purpose:
*
* Place an advisory lock on a file.
* No effect on Read-Only S3 file.
*
* Suggestion: remove lock/unlock from class
* > would result in error at H5FD_[un]lock() (H5FD.c)
*
* Return:
*
* SUCCEED (No-op always succeeds)
*
* Programmer: Jacob Smith
* 2017-11-03
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_ros3_lock(H5FD_t H5_ATTR_UNUSED *_file, hbool_t H5_ATTR_UNUSED rw)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR

FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_ros3_lock() */

/*-------------------------------------------------------------------------
*
* Function: H5FD_ros3_unlock()
*
* Purpose:
*
* Remove the existing lock on the file.
* No effect on Read-Only S3 file.
*
* Return:
*
* SUCCEED (No-op always succeeds)
*
* Programmer: Jacob Smith
* 2017-11-03
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_ros3_unlock(H5FD_t H5_ATTR_UNUSED *_file)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR

FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_ros3_unlock() */

#endif /* H5_HAVE_ROS3_VFD */