ae1db8bd101ae572e4382748dc4b19b176449fa0 chmalee Thu Apr 23 09:22:05 2026 -0700 Fix hubSpace quota calculation to use quotax(1024x1024x1024) rather than quotax10^9, refs #37425 diff --git src/hg/inc/userdata.h src/hg/inc/userdata.h index 36f5124ebb2..8ff4014ea91 100644 --- src/hg/inc/userdata.h +++ src/hg/inc/userdata.h @@ -19,31 +19,32 @@ struct userHubs *next; char *hubName; // name of this hub char *genome; // only one genome allowed per hub for now char *userName; // for convenience time_t lastModified; // actually last access time but this works struct userFiles *fileList; // list of files (tracks) in the hub }; char *getUserName(); /* Query the right system for the users name */ char *emailForUserName(char *userName); /* Fetch the email for this user from gbMembers hgcentral table */ // the various quota helper variables: -#define HUB_SPACE_DEFAULT_QUOTA_BYTES 10000000000 +// 10 GiB in bytes, so the binary-unit pretty-printers display it as "10 GB". +#define HUB_SPACE_DEFAULT_QUOTA_BYTES (10LL * 1024 * 1024 * 1024) #define HUB_SPACE_DEFAULT_QUOTA HUB_SPACE_DEFAULT_QUOTA_BYTES // for defining the quota in hg.conf #define HUB_SPACE_CONF_QUOTA_VAR "hubspace.quota" char *webDataDir(char *userName); /* Return a web accesible path to the userDataDir, this is different from the full path tusd uses */ char *urlForFile(char *userName, char *filePath); /* Return a web accessible URL to filePath */ char *getEncodedUserNamePath(char *userName); /* Compute the path for just the userName part of the users upload */ char *getDataDir(char *userName); /* Return the full path to the user specific data directory, can be configured via hg.conf