• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/jfs/

Lines Matching defs:nblocks

76 			int nblocks);
83 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
85 int nblocks);
87 int nblocks,
90 int nblocks);
91 static int dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks,
94 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
96 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
98 static int dbExtend(struct inode *ip, s64 blkno, s64 nblocks, s64 addnblocks);
103 int nblocks);
105 int nblocks);
114 int nblocks);
115 static int dbInitDmap(struct dmap * dp, s64 blkno, int nblocks);
119 static int dbGetL2AGSize(s64 nblocks);
326 * nblocks - number of blocks to be freed.
332 int dbFree(struct inode *ip, s64 blkno, s64 nblocks)
344 if (unlikely((blkno == 0) || (blkno + nblocks > bmp->db_mapsize))) {
346 printk(KERN_ERR "blkno = %Lx, nblocks = %Lx\n",
348 (unsigned long long) nblocks);
358 for (rem = nblocks; rem > 0; rem -= nb, blkno += nb) {
410 * nblocks - number of contiguous blocks in the range.
419 int free, s64 blkno, s64 nblocks, struct tblock * tblk)
433 if (blkno + nblocks > bmp->db_mapsize) {
434 printk(KERN_ERR "blkno = %Lx, nblocks = %Lx\n",
436 (unsigned long long) nblocks);
452 for (rem = nblocks; rem > 0; rem -= nblks, blkno += nblks) {
686 * nblocks - number of contiguous blocks in the range.
695 int dbAlloc(struct inode *ip, s64 hint, s64 nblocks, s64 * results)
707 /* assert that nblocks is valid */
708 assert(nblocks > 0);
714 l2nb = BLKSTOL2(nblocks);
732 rc = dbAllocAny(bmp, nblocks, l2nb, results);
770 if (nblocks <= BPERDMAP) {
786 if ((rc = dbAllocNext(bmp, dp, blkno, (int) nblocks))
813 dbAllocNear(bmp, dp, blkno, (int) nblocks, l2nb, results))
825 if ((rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results))
842 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) != -ENOSPC)
858 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) == -ENOSPC)
859 rc = dbAllocAny(bmp, nblocks, l2nb, results);
881 * nblocks - extent length;
888 int dbAllocExact(struct inode *ip, s64 blkno, int nblocks)
906 if (nblocks <= 0 || nblocks > BPERDMAP || blkno >= bmp->db_mapsize) {
911 if (nblocks > ((s64) 1 << bmp->db_maxfreebud)) {
927 rc = dbAllocNext(bmp, dp, blkno, nblocks);
958 * nblocks - number of contiguous blocks within the current
974 s64 blkno, s64 nblocks, s64 addnblocks, s64 * results)
980 if ((rc = dbExtend(ip, blkno, nblocks, addnblocks)) == 0) {
994 (ip, blkno + nblocks - 1, addnblocks + nblocks, results));
1012 * nblocks - number of contiguous blocks within the current
1021 static int dbExtend(struct inode *ip, s64 blkno, s64 nblocks, s64 addnblocks)
1036 (rel_block + nblocks + addnblocks > sbi->nbperpage))
1040 lastblkno = blkno + nblocks - 1;
1113 * nblocks - number of contiguous free blocks of the range.
1123 int nblocks)
1149 if (dbitno + nblocks > BPERDMAP)
1171 for (rembits = nblocks; rembits > 0; rembits -= nb, dbitno += nb) {
1223 return (dbAllocDmap(bmp, dp, blkno, nblocks));
1242 * nblocks - actual number of contiguous free blocks desired.
1256 struct dmap * dp, s64 blkno, int nblocks, int l2nb, s64 * results)
1300 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0)
1352 * nblocks - actual number of contiguous free blocks desired.
1365 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results)
1407 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results);
1412 (unsigned long long) nblocks);
1522 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results);
1554 * nblocks - actual number of contiguous free blocks desired.
1566 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results)
1582 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results);
1724 * nblocks - actual number of contiguous free blocks to allocate.
1739 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
1759 rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results);
1775 for (n = nblocks, b = blkno; n > 0; n -= nb, b += nb) {
1827 for (n = nblocks - n, b = blkno; n > 0;
1871 * if so, nblocks of blocks are allocated; otherwise, ENOSPC is
1878 * nblocks - actual number of contiguous block desired.
1892 struct dmap * dp, int nblocks, int l2nb, s64 * results)
1920 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0)
1946 * nblocks - number of blocks to be allocated.
1955 int nblocks)
1966 dbAllocBits(bmp, dp, blkno, nblocks);
1977 dbFreeBits(bmp, dp, blkno, nblocks);
2001 * nblocks - number of blocks to be freed.
2010 int nblocks)
2021 rc = dbFreeBits(bmp, dp, blkno, nblocks);
2042 dbAllocBits(bmp, dp, blkno, nblocks);
2065 * nblocks - number of bits to be allocated.
2072 int nblocks)
2089 assert(dbitno + nblocks <= BPERDMAP);
2104 for (rembits = nblocks; rembits > 0; rembits -= nb, dbitno += nb) {
2176 le32_add_cpu(&dp->nfree, -nblocks);
2189 bmp->db_agfree[agno] -= nblocks;
2190 bmp->db_nfree -= nblocks;
2212 * nblocks - number of bits to be freed.
2219 int nblocks)
2234 assert(dbitno + nblocks <= BPERDMAP);
2253 for (rembits = nblocks; rembits > 0; rembits -= nb, dbitno += nb) {
2320 le32_add_cpu(&dp->nfree, nblocks);
2328 bmp->db_nfree += nblocks;
2329 bmp->db_agfree[agno] += nblocks;
3098 * nblocks - number of blocks to be freed.
3104 int dbAllocBottomUp(struct inode *ip, s64 blkno, s64 nblocks)
3116 ASSERT(nblocks <= bmp->db_mapsize - blkno);
3122 for (rem = nblocks; rem > 0; rem -= nb, blkno += nb) {
3160 int nblocks)
3182 assert(dbitno + nblocks <= BPERDMAP);
3197 for (rembits = nblocks; rembits > 0; rembits -= nb, dbitno += nb) {
3230 le32_add_cpu(&dp->nfree, -nblocks);
3246 bmp->db_agfree[agno] -= nblocks;
3247 bmp->db_nfree -= nblocks;
3260 dbFreeBits(bmp, dp, blkno, nblocks);
3269 * FUNCTION: extend bmap from blkno for nblocks;
3283 int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks)
3298 newsize = blkno + nblocks;
3300 jfs_info("dbExtendFS: blkno:%Ld nblocks:%Ld newsize:%Ld",
3301 (long long) blkno, (long long) nblocks, (long long) newsize);
3458 n = min(nblocks, (s64)BPERDMAP - n);
3466 n = min(nblocks, (s64)BPERDMAP);
3482 nblocks -= n;
3483 if (nblocks == 0)
3495 if (nblocks)
3519 if (nblocks)
3643 * nblocks - number of blocks this page
3647 static int dbInitDmap(struct dmap * dp, s64 Blkno, int nblocks)
3655 dp->nblocks = dp->nfree = cpu_to_le32(nblocks);
3658 if (nblocks == BPERDMAP) {
3664 le32_add_cpu(&dp->nblocks, nblocks);
3665 le32_add_cpu(&dp->nfree, nblocks);
3676 for (r = nblocks; r > 0; r -= nb, blkno += nb) {
3715 /* does nblocks fall on a 32-bit boundary ? */
3900 * nblocks - Number of blocks in aggregate
3904 static int dbGetL2AGSize(s64 nblocks)
3910 if (nblocks < BPERDMAP * MAXAG)
3916 if (m & nblocks)
3921 if (sz < nblocks)
3955 s64 nblocks;
3960 nblocks = ipbmap->i_size >> JFS_SBI(sb)->l2bsize;
3961 npages = nblocks >> JFS_SBI(sb)->l2nbperpage;
3989 nblocks = ndmaps << L2BPERDMAP;
3991 return (nblocks);