Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
bc6a8ad2
Commit
bc6a8ad2
authored
6 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Limit chunksizehint to filesize.
parent
732fcc10
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
src/cdf_int.c
+4
-3
4 additions, 3 deletions
src/cdf_int.c
with
8 additions
and
3 deletions
ChangeLog
+
4
−
0
View file @
bc6a8ad2
...
...
@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.1
* Version 1.9.5 released
2018-05-31 Uwe Schulzweida
* Limit chunksizehint to filesize
2018-05-30 Uwe Schulzweida
* Added error code CDI_ETMOF (Too many open files)
...
...
This diff is collapsed.
Click to expand it.
src/cdf_int.c
+
4
−
3
View file @
bc6a8ad2
...
...
@@ -77,7 +77,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
struct
stat
filestat
;
size_t
chunksizehint
=
0
;
#if
def
ined (
HAVE_LIBNC_DAP
)
#ifdef
HAVE_LIBNC_DAP
if
(
strncmp
(
path
,
"http:"
,
5
)
==
0
||
strncmp
(
path
,
"https:"
,
6
)
==
0
)
dapfile
=
true
;
#endif
...
...
@@ -89,8 +89,9 @@ int cdf_open(const char *path, int omode, int *ncidp)
{
if
(
stat
(
path
,
&
filestat
)
!=
0
)
SysError
(
path
);
#if
def
ined (
HAVE_STRUCT_STAT_ST_BLKSIZE
)
#ifdef
HAVE_STRUCT_STAT_ST_BLKSIZE
chunksizehint
=
(
size_t
)
filestat
.
st_blksize
*
4
;
if
(
chunksizehint
>
(
size_t
)
filestat
.
st_size
)
chunksizehint
=
(
size_t
)
filestat
.
st_size
;
#endif
/*
if ( chunksizehint < ChunkSizeMin ) chunksizehint = ChunkSizeMin;
...
...
@@ -101,7 +102,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
/* FIXME: parallel part missing */
status
=
nc__open
(
path
,
omode
,
&
chunksizehint
,
ncidp
);
if
(
CDF_Debug
)
Message
(
"chunksizehint %
d
"
,
chunksizehint
);
if
(
CDF_Debug
)
Message
(
"chunksizehint %
zu
"
,
chunksizehint
);
}
if
(
CDF_Debug
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment