Commit 0ceae3eb authored by Philip Carns's avatar Philip Carns

remove old logic for collecting device id via stat


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@682 3b7491f3-a168-0410-bf4b-c445ed680a29
parent b4d56b54
......@@ -13,6 +13,9 @@ darshan-2.2.6-pre1
can be used with any Darshan installation.
* Change default MPI-IO hints for writing log file to
romio_no_indep_rw=true and cb_nodes=4 to improve log creation performance
* Optimize darshan startup by collecting mount point information at rank 0 and
broadcasting to all processes
* Remove deprecated --enable-st-dev-workaround configure option
darshan-2.2.5
=============
......
......@@ -688,7 +688,6 @@ enable_cuserid
enable_ld_preload
enable_group_readable_logs
enable_stat_at_open
enable_st_dev_workaround
with_mem_align
with_log_path_by_env
with_log_hints
......@@ -1317,7 +1316,6 @@ Optional Features:
--disable-ld-preload Disables support for LD_PRELOAD library
--enable-group-readable-logs Set log files to be group readable
--enable-stat-at-open Perform stat() call at open time to gather extra statistics
--enable-st-dev-workaround Gather device id from parent directory instead of file
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
......@@ -3667,20 +3665,6 @@ fi
# Check whether --enable-st-dev-workaround was given.
if test "${enable_st_dev_workaround+set}" = set; then :
enableval=$enable_st_dev_workaround; if test "x$enableval" = "xyes" ; then
$as_echo "#define __CP_ST_DEV_WORKAROUND 1" >>confdefs.h
DISABLE_LDPRELOAD="1"
fi
fi
# Check whether --with-mem-align was given.
if test "${with_mem_align+set}" = set; then :
withval=$with_mem_align; if test x$withval = xyes; then
......
......@@ -57,16 +57,6 @@ AC_ARG_ENABLE(stat-at-open,
fi]
,)
AC_ARG_ENABLE(st-dev-workaround,
[ --enable-st-dev-workaround Gather device id from parent directory instead of file],
[if test "x$enableval" = "xyes" ; then
AC_DEFINE(__CP_ST_DEV_WORKAROUND, 1, Define if device id should be taken from parent directory rather than file)
DISABLE_LDPRELOAD="1"
fi]
,)
AC_ARG_WITH(mem-align,
[ --with-mem-align=<num> Memory alignment in bytes],
if test x$withval = xyes; then
......
......@@ -103,9 +103,5 @@
statistics */
#undef __CP_STAT_AT_OPEN
/* Define if device id should be taken from parent directory rather than file
*/
#undef __CP_ST_DEV_WORKAROUND
/* Generalized request type for MPI-IO */
#undef __D_MPI_REQUEST
......@@ -230,6 +230,7 @@ void darshan_walk_file_accesses(struct darshan_job_runtime* final_job);
double darshan_wtime(void);
void darshan_mnt_id_from_path(const char* path, int64_t* device_id, int64_t* block_size);
char* darshan_get_exe_and_mounts(struct darshan_job_runtime* final_job);
void darshan_mpi_initialize(int *argc, char ***argv);
uint32_t darshan_hashlittle(const void *key, size_t length, uint32_t initval);
uint64_t darshan_hash(const register unsigned char *k, register uint64_t length, register uint64_t level);
......
......@@ -266,29 +266,10 @@ static char* clean_path(const char* path);
CP_INC(__file, CP_POSIX_STATS, 1); \
} while(0)
static inline dev_t get_device(const char* path, struct stat64* statbuf)
{
dev_t device = 0;
#ifdef __CP_ST_DEV_WORKAROUND
struct stat64 dirstat;
char* tmp_path = strdup(path);
char* parent = dirname(tmp_path);
if(parent && stat64(parent, &dirstat) == 0)
device = dirstat.st_dev;
if(tmp_path) free(tmp_path);
#else
device = statbuf->st_dev;
#endif
return(device);
}
#ifdef __CP_STAT_AT_OPEN
#define CP_STAT_FILE(_f, _p, _r) do { \
if(!CP_VALUE((_f), CP_POSIX_STATS) && !CP_VALUE((_f), CP_POSIX_OPENS)){ \
if(fstat64(_r, &cp_stat_buf) == 0) { \
CP_SET(_f, CP_DEVICE, get_device(_p, &cp_stat_buf)); \
CP_SET(_f, CP_FILE_ALIGNMENT, cp_stat_buf.st_blksize); \
CP_SET(_f, CP_SIZE_AT_OPEN, cp_stat_buf.st_size); \
}\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment