rem: node->gid = stat->st_gid;
add: node.gid = HOST_ENDIAN_TO_BFS_INT32(stat->st_gid);
context: bfs_write_stat(void *_ns, void *_node, const struct stat *stat, uint32 mask){	FUNCTION();	if (_ns == NULL || _node == NULL || stat == NULL)		RETURN_ERROR(B_BAD_VALUE);	Volume *volume = (Volume *)_ns;	Inode *inode = (Inode *)_node;	// that may be incorrect here - I don't think we need write access to	// change most of the stat...	// we should definitely check a bit more if the new stats are correct and valid...		status_t status = inode->CheckPermissions(W_OK);	if (status < B_OK)		RETURN_ERROR(status);#ifdef UNSAFE_GET_VNODE	RecursiveLocker locker(volume->Lock());#endif	WriteLocked locked(inode->Lock());	if (locked.IsLocked() < B_OK)		RETURN_ERROR(B_ERROR);	Transaction transaction(volume, inode->BlockNumber());	bfs_inode *node = inode->Node();	if (mask & FS_WRITE_STAT_SIZE) {		// Since WSTAT_SIZE is the only thing that can fail directly, we		// do it first, so that the inode state will still be consistent		// with the on-disk version		if (inode->IsDirectory())			return B_IS_A_DIRECTORY;		if (inode->Size() != stat->st_size) {			status = inode->SetFileSize(&transaction, stat->st_size);			if (status < B_OK)				return status;			// fill the new blocks (if any) with zeros			inode->FillGapWithZeros(inode->OldSize(), inode->Size());			Index index(volume);			index.UpdateSize(&transaction, inode);			if ((mask & FS_WRITE_STAT_MTIME) == 0)				index.UpdateLastModified(&transaction, inode);		}	}	if (mask & FS_WRITE_STAT_MODE) {		PRINT(("original mode = %ld, stat->st_mode = %d\n", node->mode, stat->st_mode));		node->mode = node->mode & ~S_IUMSK | stat->st_mode & S_IUMSK;	}	if (mask & FS_WRITE_STAT_UID)		node->uid = stat->st_uid;	if (mask & FS_WRITE_STAT_GID)		node->gid = stat->st_gid;	if (mask & FS_WRITE_STAT_MTIME) {		// Index::UpdateLastModified() will set the new time in the inode		Index index(volume);		index.UpdateLastModified(&transaction, inode,			(bigtime_t)stat->st_mtime << INODE_TIME_SHIFT);	}	if (mask & FS_WRITE_STAT_CRTIME) {		node->create_time = (bigtime_t)stat->st_crtime << INODE_TIME_SHIFT;	}	if ((status = inode->WriteBack(&transaction)) == B_OK)		transaction.Done();	notify_listener(B_STAT_CHANGED, volume->ID(), 0, 0, inode->ID(), NULL);	return status;}