X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fbucket.h;h=bdf35e81d97c2df2c73747107347ac6a840fc937;hb=68aea40e09df6409198bcf423cd4acb9fffd0a88;hp=f99baae92ffbc6068952363e99d324fb8a5f61c9;hpb=37ce60ff458c8bb8794b380e8fe7508c0e9315d2;p=libucw.git diff --git a/lib/bucket.h b/lib/bucket.h index f99baae9..bdf35e81 100644 --- a/lib/bucket.h +++ b/lib/bucket.h @@ -55,3 +55,10 @@ void obuck_create_end(struct fastbuf *b, struct obuck_header *hdrp); /* Deleting buckets */ void obuck_delete(oid_t oid); + +/* Convert bucket ID to file position (for size limitations etc.) */ + +static inline sh_off_t obuck_get_pos(oid_t oid) +{ + return ((sh_off_t) oid) << OBUCK_SHIFT; +}