Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/ext2fs/ext2_alloc.c
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | |||||
nospace: | nospace: | ||||
EXT2_UNLOCK(ump); | EXT2_UNLOCK(ump); | ||||
ext2_fserr(fs, cred->cr_uid, "filesystem full"); | ext2_fserr(fs, cred->cr_uid, "filesystem full"); | ||||
uprintf("\n%s: write failed, filesystem is full\n", fs->e2fs_fsmnt); | uprintf("\n%s: write failed, filesystem is full\n", fs->e2fs_fsmnt); | ||||
return (ENOSPC); | return (ENOSPC); | ||||
} | } | ||||
/* | /* | ||||
* Allocate EA's block for inode. | |||||
*/ | |||||
daddr_t | |||||
ext2_allocfacl(struct inode *ip) | |||||
{ | |||||
struct m_ext2fs *fs; | |||||
daddr_t facl; | |||||
fs = ip->i_e2fs; | |||||
EXT2_LOCK(ip->i_ump); | |||||
facl = ext2_alloccg(ip, ino_to_cg(fs, ip->i_number), 0, fs->e2fs_bsize); | |||||
if (0 == facl) | |||||
EXT2_UNLOCK(ip->i_ump); | |||||
return (facl); | |||||
} | |||||
/* | |||||
* Reallocate a sequence of blocks into a contiguous sequence of blocks. | * Reallocate a sequence of blocks into a contiguous sequence of blocks. | ||||
* | * | ||||
* The vnode and an array of buffer pointers for a range of sequential | * The vnode and an array of buffer pointers for a range of sequential | ||||
* logical blocks to be made contiguous is given. The allocator attempts | * logical blocks to be made contiguous is given. The allocator attempts | ||||
* to find a range of sequential blocks starting as close as possible to | * to find a range of sequential blocks starting as close as possible to | ||||
* an fs_rotdelay offset from the end of the allocation for the logical | * an fs_rotdelay offset from the end of the allocation for the logical | ||||
* block immediately preceding the current range. If successful, the | * block immediately preceding the current range. If successful, the | ||||
* physical block numbers in the buffer pointers and in the inode are | * physical block numbers in the buffer pointers and in the inode are | ||||
▲ Show 20 Lines • Show All 976 Lines • Show Last 20 Lines |