David Chinner wrote: > It's a good first cut - comments are inline in the patch below. > > > > Looks like some whitespace problems there (mixing spaces and tabs). > Also, can you include empty lines either side of a unique hunk of code > like this? > > I wonder how many other places we are going to have to put this check? > I haven't looked myself, but this is a good place to start ;) > > I'm still wondering how should I educate emacs to introduce alsways tabs ;) > You shouldn't renumber the existing ioctls - that changes the > interfaces to userspace and so will break lots of stuff :( Just put > them at the end as 126/127. (Oh, you've got two "111" ioctls in > there, anyway ;) > > IOWs, the flag passed to xfs_trans_alloc() defines the type of the > transaction and the flag passed to xfs_alloc_log_agf() defines what > has been modified within the transaction. > > Ok, thank you for the explanation, I think that now I got it right. Attached is a new patch. There is one question that I would like to ask: when you sketched the xfs_alloc_set_flag_ag function, you put inside it the call to the funcintion xfs_alloc_log_agf (see next code snippet). STATIC void xfs_alloc_set_flag_ag( xfs_trans_t *tp, xfs_buf_t *agbp, /* buffer for a.g. freelist header */ xfs_perag_t *pag, int flag) { xfs_agf_t *agf; /* a.g. freespace structure */ agf = XFS_BUF_TO_AGF(agbp); pag->pagf_flags |= flag; agf->agf_flags = cpu_to_be32(pag->pagf_flags); xfs_alloc_log_agf(tp, agbp, XFS_AGF_FLAGS); <-- ***** FROM HERE } is it required to do the transaction log right after the change or can it be done in the caller function right after calling xfs_alloc_set_flag_ag? For example caller(...) { xfs_alloc_set_flag_ag(tp, bp, pag, XFS_AGFLAG_ALLOC_DENY); <-- **** TO HERE xfs_trans_set_sync(tp); xfs_trans_commit(tp, 0); } Thanks -- Rubén Porras LinWorks GmbH