netfs_group
struct netfs_group *group = netfs_folio_group(folio);
struct netfs_group *group;
if (unlikely(group != netfs_group) &&
WARN_ON_ONCE(!netfs_group);
finfo->netfs_group = netfs_get_group(netfs_group);
if (likely(priv == netfs_group)) {
if (!netfs_group)
folio_change_private(folio, netfs_get_group(netfs_group));
folio_attach_private(folio, netfs_get_group(netfs_group));
if (netfs_group)
folio_change_private(folio, netfs_group);
struct netfs_group *netfs_group)
return netfs_perform_write(iocb, from, netfs_group);
vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf, struct netfs_group *netfs_group)
struct netfs_group *group;
group != netfs_group &&
if (priv != netfs_group) {
if (!netfs_group && priv == NETFS_FOLIO_COPY_TO_CACHE)
else if (netfs_group && priv == NETFS_FOLIO_COPY_TO_CACHE)
folio_change_private(folio, netfs_get_group(netfs_group));
else if (netfs_group && !priv)
folio_attach_private(folio, netfs_get_group(netfs_group));
struct netfs_group *netfs_group)
struct netfs_group *netfs_group)
static inline struct netfs_group *netfs_get_group(struct netfs_group *netfs_group)
if (netfs_group && netfs_group != NETFS_FOLIO_COPY_TO_CACHE)
refcount_inc(&netfs_group->ref);
return netfs_group;
static inline void netfs_put_group(struct netfs_group *netfs_group)
if (netfs_group &&
netfs_group != NETFS_FOLIO_COPY_TO_CACHE &&
refcount_dec_and_test(&netfs_group->ref))
netfs_group->free(netfs_group);
static inline void netfs_put_group_many(struct netfs_group *netfs_group, int nr)
if (netfs_group &&
netfs_group != NETFS_FOLIO_COPY_TO_CACHE &&
refcount_sub_and_test(nr, &netfs_group->ref))
netfs_group->free(netfs_group);
if (finfo->netfs_group)
folio_change_private(folio, finfo->netfs_group);
struct netfs_group *group = NULL;
group = finfo->netfs_group;
struct netfs_group *fgroup; /* TODO: Use this with ceph */
struct netfs_group *group = NULL;
group = finfo->netfs_group;
static inline struct netfs_group *netfs_folio_group(struct folio *folio)
return finfo->netfs_group;
struct netfs_group *group; /* Writeback group being written back */
struct netfs_group *netfs_group);
struct netfs_group *netfs_group);
struct netfs_group *netfs_group);
vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf, struct netfs_group *netfs_group);
void (*free)(struct netfs_group *netfs_group);
struct netfs_group *netfs_group; /* Filesystem's grouping marker (or NULL). */
#define NETFS_FOLIO_COPY_TO_CACHE ((struct netfs_group *)0x356UL) /* Write to the cache only */