/* Numbers of blocks needed for updates - we count with the smallest
* possible block size (1024) */ #define QTREE_INIT_ALLOC 4 #define QTREE_INIT_REWRITE 2 #define QTREE_DEL_ALLOC 0 #define QTREE_DEL_REWRITE 6
struct dquot; struct kqid;
/* Operations */ struct qtree_fmt_operations { void (*mem2disk_dqblk)(void *disk, struct dquot *dquot); /* Convert given entry from in memory format to disk one */ void (*disk2mem_dqblk)(struct dquot *dquot, void *disk); /* Convert given entry from disk format to in memory one */ int (*is_id)(void *disk, struct dquot *dquot); /* Is this structure for given id? */
};
/* Inmemory copy of version specific information */ struct qtree_mem_dqinfo { struct super_block *dqi_sb; /* Sb quota is on */ int dqi_type; /* Quota type */ unsignedint dqi_blocks; /* # of blocks in quota file */ unsignedint dqi_free_blk; /* First block in list of free blocks */ unsignedint dqi_free_entry; /* First block with free entry */ unsignedint dqi_blocksize_bits; /* Block size of quota file */ unsignedint dqi_entry_size; /* Size of quota entry in quota file */ unsignedint dqi_usable_bs; /* Space usable in block for quota data */ unsignedint dqi_qtree_depth; /* Precomputed depth of quota tree */ conststruct qtree_fmt_operations *dqi_ops; /* Operations for entry manipulation */
};
int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); int qtree_delete_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); int qtree_release_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk); staticinlineint qtree_depth(struct qtree_mem_dqinfo *info)
{ unsignedint epb = info->dqi_usable_bs >> 2; unsignedlonglong entries = epb; int i;
for (i = 1; entries < (1ULL << 32); i++)
entries *= epb; return i;
} int qtree_get_next_id(struct qtree_mem_dqinfo *info, struct kqid *qid);
#endif/* _LINUX_DQBLK_QTREE_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.