What if the 1807 coup by the Janissaries against Sultan Selim III failed? Could it had allowed the Sultan to disband the Janissaries and implement the Tanzimat reforms a decade or two earlier then OTL?
Well certainly had the Janissaries/assassins failed the pro-Selim army under Alemdar Pasa would have gone into Constantinople and massacred the anti-Selim faction; control would then go to Alemdar Pasa who, along with support from Selim III, would be in the best position to pursue reforms.
However, I'm not sure how far-reaching these reforms would be, and I sort of doubt that they would be as far-reaching as Mahmud's reforms (which were carried under the threat of the death of the Ottoman Empire under either Russia or Egypt).
Certainly the focus was on military reform rather than some grand social project - of course there would be some social reform that would have to accompany the military reform, i.e. abolition of the deviserme system - so I have the feeling that a China-esque 'Westernization' would result from Selim's reform - you'd have the trappings of a modern army & navy, but the social/economic structures behind it would still be unable to sustain a conflict with a comparable power.
Then you have the figure of Alemdar Pasa, who was a local governor/landowner in the Balkans and would likely become the political leader of Ottoman reform efforts. That alone seems to indicate that the sort of comprehensive economic-and-political reform that the Ottomans needed probably wasn't going to happen, since doing so would harm Alemdar's own local power base.