diff options
author | Petr Pisar <ppisar@redhat.com> | 2011-02-09 15:40:08 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-02-16 18:19:14 +0100 |
commit | f9fddb72437a5566f7d56d67725326284e8c1007 (patch) | |
tree | a4d014f42954873d2caec5b2a071f3dfc7955d34 | |
parent | ccbade224e6a69c2322fda74b1726d88bf3571de (diff) |
Initialize vfsold block and inode value boundaries for new quota file
Otherwise `quotackech -c -F vfsold' fails with `Trying to set quota
usage out of range supported by quota format on...' because initial
boundary is zero.
Fixes SF bug #3176326.
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quotaio_v1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/quotaio_v1.c b/quotaio_v1.c index 305bff2..61bd93e 100644 --- a/quotaio_v1.c +++ b/quotaio_v1.c @@ -195,6 +195,10 @@ static int v1_new_io(struct quota_handle *h) ddqblk.dqb_itime = MAX_IQ_TIME; h->qh_info.dqi_bgrace = MAX_DQ_TIME; h->qh_info.dqi_igrace = MAX_IQ_TIME; + h->qh_info.dqi_max_b_limit = ~(uint32_t)0; + h->qh_info.dqi_max_i_limit = ~(uint32_t)0; + h->qh_info.dqi_max_b_usage = ((uint64_t)(~(uint32_t)0)) << V1_DQBLK_SIZE_BITS; + h->qh_info.dqi_max_i_usage = ~(uint32_t)0; lseek(h->qh_fd, 0, SEEK_SET); if (write(h->qh_fd, &ddqblk, sizeof(ddqblk)) != sizeof(ddqblk)) return -1; |