---
title: vfs_getnewfsid
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: kernel/1523259-vfs_getnewfsid
---

# vfs_getnewfsid

Generate a unique filesystem ID for a mount and store it in the mount structure.

## Declaration

```occ
void vfs_getnewfsid(struct mount *mp);
```

## Parameters

- `mp`: Mount to set an ID for.

## Return Value

Return Value void.

## Discussion

Discussion Filesystem IDs are returned as part of "struct statfs." This function is typically called as part of file-system specific mount code (i.e. through VFS_MOUNT).
