diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-05-01 10:07:37 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-05-01 10:07:37 +0200 |
commit | d04a9d1fe99eb0e1661cf7f2169b3f7dd0792efc (patch) | |
tree | 089e8666e793001c53f15e9091db2e1ee6cd3567 /pgsql.c | |
parent | 8811c74439ef985fabd781584d1a9ddf3b627fc3 (diff) | |
download | pgfuse-d04a9d1fe99eb0e1661cf7f2169b3f7dd0792efc.tar.gz pgfuse-d04a9d1fe99eb0e1661cf7f2169b3f7dd0792efc.tar.bz2 |
more cleanup around 64-bit id/inodes
Diffstat (limited to 'pgsql.c')
-rw-r--r-- | pgsql.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -88,7 +88,7 @@ static PgDataInfo compute_block_info( off_t offset, size_t len ) return info; } -int psql_path_to_id( PGconn *conn, const char *path ) +int64_t psql_path_to_id( PGconn *conn, const char *path ) { PGresult *res; int idx; @@ -156,7 +156,7 @@ int psql_path_to_id( PGconn *conn, const char *path ) /* --- postgresql implementation --- */ -int psql_read_meta( PGconn *conn, const int64_t id, const char *path, PgMeta *meta ) +int64_t psql_read_meta( PGconn *conn, const int64_t id, const char *path, PgMeta *meta ) { PGresult *res; int idx; @@ -224,7 +224,7 @@ int psql_read_meta( PGconn *conn, const int64_t id, const char *path, PgMeta *me return id; } -int psql_read_meta_from_path( PGconn *conn, const char *path, PgMeta *meta ) +int64_t psql_read_meta_from_path( PGconn *conn, const char *path, PgMeta *meta ) { int id = psql_path_to_id( conn, path ); @@ -321,7 +321,7 @@ int psql_read_buf( PGconn *conn, const int64_t id, const char *path, char *buf, char *dst; PgMeta meta; int size; - int tmp; + int64_t tmp; tmp = psql_read_meta( conn, id, path, &meta ); if( tmp < 0 ) { @@ -716,7 +716,7 @@ int psql_write_buf( PGconn *conn, const int64_t id, const char *path, const char int psql_truncate( PGconn *conn, const int64_t id, const char *path, const off_t offset ) { PgDataInfo info; - int res; + int64_t res; PgMeta meta; int64_t param1; int64_t param2; @@ -747,7 +747,7 @@ int psql_truncate( PGconn *conn, const int64_t id, const char *path, const off_t PQclear( dbres ); - // TODO: pad rest of now last block + /* TODO: pad rest of now last block */ meta.size = offset; |