aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-common.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bcachefs: fix missing includeKent Overstreet2024-07-141-0/+2
| | | | | | fs-common.h needs dirent.h for enum bch_rename_mode Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
* bcachefs: Add BCH_SUBVOLUME_UNLINKEDKent Overstreet2023-10-221-1/+1
| | | | | | | | Snapshot deletion needs to become a multi step process, where we unlink, then tear down the page cache, then delete the subvolume - the deleting flag is equivalent to an inode with i_nlink = 0. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
* bcachefs: Snapshot creation, deletionKent Overstreet2023-10-221-2/+5
| | | | | | | | | | | This is the final patch in the patch series implementing snapshots. This patch implements two new ioctls that work like creation and deletion of directories, but fancier. - BCH_IOCTL_SUBVOLUME_CREATE, for creating new subvolumes and snaphots - BCH_IOCTL_SUBVOLUME_DESTROY, for deleting subvolumes and snapshots Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
* bcachefs: Plumb through subvolume idKent Overstreet2023-10-221-9/+12
| | | | | | | | | | | | | | To implement snapshots, we need every filesystem btree operation (every btree operation without a subvolume) to start by looking up the subvolume and getting the current snapshot ID, with bch2_subvolume_get_snapshot() - then, that snapshot ID is used for doing btree lookups in BTREE_ITER_FILTER_SNAPSHOTS mode. This patch adds those bch2_subvolume_get_snapshot() calls, and also switches to passing around a subvol_inum instead of just an inode number. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
* bcachefs: Update directory timestamps during linkJustin Husted2023-10-221-0/+1
| | | | | | | | | Timestamp updates on the directory during a link operation were cached. This is inconsistent with other metadata operations such as rename, as well as being less efficient. Signed-off-by: Justin Husted <sigstop@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
* bcachefs: Can't be holding read locks while taking write locksKent Overstreet2023-10-221-2/+1
| | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
* bcachefs: Factor out fs-common.cKent Overstreet2023-10-221-0/+37
This refactoring makes the code easier to understand by separating the bcachefs btree transactional code from the linux VFS code - but more importantly, it's also to share code with the fuse port. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>