43 return (ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino ||
44 (xfs_sb_version_hasquota(&mp->m_sb) &&
45 (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino)));
78 XFS_ILOCK_SHARED, &ip);
85 ASSERT(ip->i_imap.im_blkno != 0);
118 buf->
bs_rdev = ip->i_df.if_u2.if_rdev;
138 error = formatter(buffer, ubsize, ubused, buf);
151 void __user *ubuffer,
156 if (ubsize <
sizeof(*buffer))
161 *ubused =
sizeof(*buffer);
178 #define XFS_BULKSTAT_UBLEFT(ubleft) ((ubleft) >= statstruct_size)
189 size_t statstruct_size,
190 char __user *ubuffer,
228 ino = (xfs_ino_t)*lastinop;
232 if (agno >= mp->m_sb.sb_agcount ||
238 if (!ubcountp || *ubcountp <= 0) {
242 ubleft = ubcount * statstruct_size;
243 *ubcountp = ubelem = 0;
248 mp->m_sb.sb_inopblock :
250 nimask = ~(nicluster - 1);
251 nbcluster = nicluster >> mp->m_sb.sb_inopblog;
256 nirbuf = irbsize /
sizeof(*irbuf);
281 irbufend = irbuf + nirbuf;
306 xfs_inobt_maskn(chunkidx,
314 for (i = 0; i < chunkidx; i++) {
318 r.
ir_free |= xfs_inobt_maskn(0, chunkidx);
349 while (irbp < irbufend && icount < ubcount) {
375 if (error || i == 0) {
393 chunkidx += nicluster,
394 agbno += nbcluster) {
395 if (xfs_inobt_maskn(chunkidx, nicluster)
429 for (agino = irbp->
ir_startino, chunkidx = clustidx = 0;
430 XFS_BULKSTAT_UBLEFT(ubleft) &&
432 chunkidx++, clustidx++, agino++) {
449 if ((chunkidx & (nicluster - 1)) == 0) {
452 ((chunkidx & nimask) >>
453 mp->m_sb.sb_inopblog);
472 ubused = statstruct_size;
473 error = formatter(mp, ino, ubufp, ubleft,
476 if (error && error !=
ENOENT &&
519 kmem_free_large(irbuf);
526 if (agno >= mp->m_sb.sb_agcount) {
535 *lastinop = (xfs_ino_t)lastino;
565 ino = (xfs_ino_t)*lastinop;
577 if (count == 0 || (xfs_ino_t)*lastinop != ino)
589 void __user *ubuffer,
594 if (
copy_to_user(ubuffer, buffer, count *
sizeof(*buffer)))
596 *written = count *
sizeof(*buffer);
608 void __user *ubuffer,
625 ino = (xfs_ino_t)*lastino;
635 while (left > 0 && agno < mp->m_sb.sb_agcount) {
667 if (error || i == 0) {
684 if (bufidx == bcount) {
686 if (formatter(ubuffer, buffer, bufidx, &written)) {
713 if (formatter(ubuffer, buffer, bufidx, &written))