summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2013-04-17 13:16:18 +0200
committerAndreas Baumann <abaumann@yahoo.com>2013-04-17 13:16:18 +0200
commitb431181bd1830beed98aed6569fe399a3636c88b (patch)
tree5b26204c4f7de16108327a8de97e43aa66f7ae63
parentc54ea201b80a28fb5285d9c72f012bfda0a3741a (diff)
downloadpgfuse-b431181bd1830beed98aed6569fe399a3636c88b.tar.gz
pgfuse-b431181bd1830beed98aed6569fe399a3636c88b.tar.bz2
more realistic values for free disk blocks
-rw-r--r--pgfuse.c4
-rw-r--r--schema.sql6
2 files changed, 5 insertions, 5 deletions
diff --git a/pgfuse.c b/pgfuse.c
index f0aa2f6..b74af59 100644
--- a/pgfuse.c
+++ b/pgfuse.c
@@ -1031,8 +1031,8 @@ static int pgfuse_statfs( const char *path, struct statvfs *buf )
return blocks_used;
}
- blocks_total = blocks_free + blocks_used;
- blocks_avail = blocks_free;
+ blocks_total = blocks_avail + blocks_used;
+ blocks_free = blocks_avail;
/* inodes */
diff --git a/schema.sql b/schema.sql
index 555fb25..2f5c202 100644
--- a/schema.sql
+++ b/schema.sql
@@ -24,12 +24,12 @@ CREATE TABLE data (
);
-- create indexes for fast data access
-CREATE INDEX data_dir_id_idx ON data( dir_id ) tablespace test2;
-CREATE INDEX data_block_no_idx ON data( block_no ) tablespace test2;
+CREATE INDEX data_dir_id_idx ON data( dir_id );
+CREATE INDEX data_block_no_idx ON data( block_no );
-- create an index on the parent_id for
-- directory listings
-CREATE INDEX dir_parent_id_idx ON dir( parent_id ) tablespace test2;
+CREATE INDEX dir_parent_id_idx ON dir( parent_id );
-- 16384 == S_IFDIR (S_IFDIR)
-- TODO: should be created by the program after checking the OS